Why I am getting errors while installing firebase-tools using npm? - firebase

I am installing firebase-tools using npm i firebase-tools
**Errors are :
**
npm ERR! code ERR_SOCKET_TIMEOUT
npm ERR! network Socket timeout
npm ERR! network This is a problem related to network connectivity.
npm ERR! network In most cases you are behind a proxy or
have bad network settings.
npm ERR! network
npm ERR! network If you are behind a proxy, please make sure that the
npm ERR! network 'proxy' config is set properly. See: 'npm help config'
npm ERR! A complete log of this run can be found in:
I updated npm but still getting same erorrs. Also changed the proxy setting using
npm config rm https-proxy
Also changed timeout settings but nothing changed.
npm config set fetch-retry-mintimeout 20000
npm config set fetch-retry-maxtimeout 120000

Related

I get multiple errors, when I try to install all modules from a package.json file on my nginx webserver

I'm currently trying to configure my portfolio on a VPS using nginx and Putty.
Now I want to install all required modules for my backend, but I get this errors.
I have no idea what to do and would love to get some help.
npm ERR! Linux 4.15.0
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "install"
npm ERR! node v8.10.0
npm ERR! npm v3.5.2
npm ERR! path /root/portfolio/server/node_modules/.staging/#types/webidl-conversions-b037bbf1/package.json
npm ERR! code ENOTDIR
npm ERR! errno -20
npm ERR! syscall open
npm ERR! ENOTDIR: not a directory, open '/root/portfolio/server/node_modules/.staging/#types/webidl-conversions-b037bbf1/package.json'
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! <https://github.com/npm/npm/issues>
npm ERR! Please include the following file with any support request:
npm ERR! /root/portfolio/server/npm-debug.log
To install all the modules, I went to my backend folder and typed 'npm install' in my Putty console.
Then it starts to download the modules and everything seems fine, until the errors pop up after a few seconds.
I also tried 'apt-get update' and 'apt-get upgrade', but it changes nothing.
I found the solution to my problem.
I had to update my node and npm, but not like usually with 'apt update', 'apt upgrade', 'apt install nodejs' or 'apt install npm'.
Instead I tried this:
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash
nvm install 14.4.0
... and then it worked.
Hope this will help someone

How to install firebase using npm package manager?

I know there are a lot of questions on stackoverflow and other sites about this, but despite all the answers given I couldn't solve my problem. For a while I have been trying to install firebase in my MERN Stack project from the command npm i firebase --save . Despite this I still get the following errors:
npm i firebase --save
npm ERR! code ENOTFOUND
npm ERR! syscall getaddrinfo
npm ERR! errno ENOTFOUND
npm ERR! network request to http://registry.npmjs.org/firebase failed, reason: getaddrinfo ENOTFOUND your-proxy-url
npm ERR! network This is a problem related to network connectivity.
npm ERR! network In most cases you are behind a proxy or have bad network settings.
npm ERR! network
npm ERR! network If you are behind a proxy, please make sure that the
npm ERR! network 'proxy' config is set properly. See: 'npm help config'
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\user\AppData\Local\npm-cache\_logs\2022-06-15T22_23_35_935Z-debug.log
After multiple searches on the Internet, I executed the following command then, npm clear cache --force npm clean cache --force but without success. I even tried this command npm i firebase --force unfortunately I get the same errors. I even copy-pasted the node_modules firebase package from another project where I had managed to install it and copied the following line into my package.json file "firebase": "^9.8.2", so that npm recognizes this package, unfortunately npm didn't recognize it because when I run I always get the same missing module errors related to firebase. I do not really know what else to do.
I found the solution on this url which is
npm config set registry http://registry.npmjs.org/
this will cause npm to use http instead of https. This means that npm will no longer be secure and will download without performing a prior check to know if I am on the right site. It is possible that it is my ISP that is blocking my connection to this site because I do not use a proxy.

I'm having a problem installing node js and npm packages for tailwind in my terminal

I have a big problem and dont know how to solve it. I wanted to start programming with tailwind css for the first time and I have big problems to get the installation process done.
When I follow the installation docs, I have to install tailwind via npm (terminal). I followed 2 YouTube Tutorials as well, but everywhere I get the same result.
Here is the output of the included terminal in VSCode and my Windows Terminal
npm install -D tailwindcss#latest postcss#latest autoprefixer#latest
npm WARN registry Unexpected warning for https://registry.npmjs.org/: Miscellaneous Warning ECONNRESET: request to https://registry.npmjs.org/tailwindcss failed, reason: read ECONNRESET
npm WARN registry Using stale data from https://registry.npmjs.org/ due to a request error during revalidation.
npm ERR! code ECONNRESET
npm ERR! errno ECONNRESET
npm ERR! network request to https://registry.npmjs.org/postcss failed, reason: read ECONNRESET
npm ERR! network This is a problem related to network connectivity.
npm ERR! network In most cases you are behind a proxy or have bad network settings.
npm ERR! network
npm ERR! network If you are behind a proxy,please make sure that the npm ERR! network 'proxy' config is set properly. See: 'npm help config'
npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\mauri\AppData\Roaming\npm-cache_logs\2021-08-06T10_38_54_659Z-debug.log
The problem is, I dont use an Proxy for Windows or something?! Does anybody have any solutions?
With best regards Tomiwa

Firebase functions install failing due to auth

I keep trying to npm install firebase functions. I've done this many times before and this is the first time I am getting this issue. The error is as follows:
PS C:\Users\jacob\Desktop\sultvueweb> npm install firebase firebase/functions
npm ERR! Error while executing:
npm ERR! C:\Program Files\Git\cmd\git.EXE ls-remote -h -t ssh://git#github.com/firebase/functions.git
npm ERR!
npm ERR! Host key verification failed.
npm ERR! fatal: Could not read from remote repository.
npm ERR!
npm ERR! Please make sure you have the correct access rights
npm ERR! and the repository exists.
npm ERR!
npm ERR! exited with error code: 128
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\jacob\AppData\Roaming\npm-cache\_logs\2020-04-28T22_58_26_800Z-debug.log
I can't seem to figure out where I need to update my credentials to make this work. Thank you for any help.
My issue was I didn't have an elevated command prompt in my text editor. I tried it in an admin prompt and worked right away. Not sure why it would have given the errors it did.

Clone Grunt Repository and Run Grunt from there

Because of proxy restrictions on a work machine, I can't seem to get grunt installed, but I can clone git repositories (don't ask).
I want to clone the grunt repository and then create a shell script to just run grunt every time I need it.
What command(s) do I need to run, from the root of the repository, to run grunt?
Edit
See the error logs below when running without proxy (with proxy idles indefinitely i.e. an entire weekend):
$ npm install grunt-cli -g
npm ERR! code ENOTFOUND
npm ERR! errno ENOTFOUND
npm ERR! network request to https://registry.npmjs.org/grunt-cli failed, reason: getaddrinfo ENOTFOUND registry.npmjs.org registry.npmjs.org:443
npm ERR! network This is a problem related to network connectivity.
npm ERR! network In most cases you are behind a proxy or have bad network settings.
npm ERR! network
npm ERR! network If you are behind a proxy, please make sure that the
npm ERR! network 'proxy' config is set properly. See: 'npm help config'
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\dembruja\AppData\Roaming\npm-cache\_logs\2018-05-11T15_57_09_186Z-debug.log`

Resources