I have istalled latest version of node and npm. When I'm trying to install a global package (npm install -g firebase-tools), the terminal show me some errors. How can I solve the problem? Thanks.
-
Did you even click the link it provides?– Ken SharpMay 4, 2020 at 9:28
-
yeah. but could not understand– SadhonMay 4, 2020 at 12:26
-
Please don't post screenshots of teminal output - edit your question to paste the actual text.– guntbertMay 5, 2020 at 21:29
1 Answer
There is a bug in the latest version of firebase-tools
, you can try using a slightly older version.
First, remove the installed version of firebase-tools
sudo npm uninstall -g firebase-tools
Now, install npm i [email protected]
npm install -g [email protected]
To confirm, type '' node in terminal and try to import the package using require
, you should have a similar output as below
-
I tried your solution and also had same result in the terminal but could not see any any file or folder related to firebase in the expected folder.– SadhonMay 6, 2020 at 17:25
-
That is obvious because you are doing a global install. If you want it only in the specific folder, open up a terminal in that folder and type npm install [email protected] May 7, 2020 at 8:40
-
It also shows "npm WARN saveError ENOENT: no such file or directory, open '/home/sadhon/package.json'"– SadhonMay 7, 2020 at 15:51