1

I am trying to add firebase to my react app.But when I type npm install firebase I get strange error like: Unexpected end of JSON input while parsing near 'Error message '. Error message is different every time i run npm install firebase.I have looked this questions:

  1. Firebase npm install error
  2. Unable to do "npm install --save firebase"
  3. Firebase - Failing to install firebase using npm but yarn works I have tried npm cache clean --force,and after npm update ,but that didn't work.Also I have tried downgrading npm,but that either did not work.Also I have tried uninstalling node,and installing again ,but that did not help either.Thanks in advance

npm version 6.13.7


node version v12.19.0

2 Answers 2

2

How about just to be sure remove package-lock.json and delete node_modules folder with rm -rf node_modules?

And after that npm install again.

Good luck.

Sign up to request clarification or add additional context in comments.

Comments

0

It looks like npm cache was corrupted ,but as npm cache clean --force did not work,deleting _cacache directory in C:\Users\User\AppData\Roaming\npm-cache solved my problem.After that npm install worked just fine.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.