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. enter image description here

  • Did you even click the link it provides?
    – Ken Sharp
    May 4, 2020 at 9:28
  • yeah. but could not understand
    – Sadhon
    May 4, 2020 at 12:26
  • Please don't post screenshots of teminal output - edit your question to paste the actual text.
    – guntbert
    May 5, 2020 at 21:29

1 Answer 1


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.
    – Sadhon
    May 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'"
    – Sadhon
    May 7, 2020 at 15:51

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .