Firebase package install giving "invalid json response body" error

When ever i am trying to install firebase package it is giving me error “invalid json response body at https://registry.npmjs.org/@firebase%2Fapp reason: Unexpected end of JSON input”. do anyone know how to solve this problem

Follow official documentation :wink:
https://firebase.google.com/docs/web/setup?sdk_version=v8#with-npm_1

I am following the offical documentation. it is giving me the error when i am trying to install with the command npm install --save firebase.

Whats your node and npm version

Are you sure you have proper internet connection ?

Ie no proxy, firewall crap etc

When i tried installing another npm package i was able to install it

https://www.npmjs.com/package/firebase

Node version :- v10.19.0

This is the package that i am getting issue with.

You can try to use CDN
From the CDN, include the individual services you use (include firebase-app first):

&lt;script src="<https://www.gstatic.com/firebasejs/${FIREBASE_VERSION}/firebase-auth.js>"&gt;&lt;/script&gt;
&lt;script src="<https://www.gstatic.com/firebasejs/${FIREBASE_VERSION}/firebase-database.js>"&gt;&lt;/script&gt;
&lt;script src="<https://www.gstatic.com/firebasejs/${FIREBASE_VERSION}/firebase-firestore.js>"&gt;&lt;/script&gt;
&lt;script src="<https://www.gstatic.com/firebasejs/${FIREBASE_VERSION}/firebase-storage.js>"&gt;&lt;/script&gt;
&lt;script src="<https://www.gstatic.com/firebasejs/${FIREBASE_VERSION}/firebase-messaging.js>"&gt;&lt;/script&gt;
&lt;script src="<https://www.gstatic.com/firebasejs/${FIREBASE_VERSION}/firebase-functions.js>"&gt;&lt;/script&gt;```
But that package never cause me trouble :wink: and I sure that if this stops working you will have people bitching about it everywhere :DD

It yeah, something is wrong on your machine / connection

My connection is perfect

Maybe there would be some issue with my maching

How can i resolve this isssue

https://github.com/firebase/firebase-admin-node/issues/282

Local npm cache is probably corrupted

I used the command npm cache verify

It did not gave me any error

Npm cache clean --force