I ran npm install --save and got the error below:
SyntaxError: Unexpected end of JSON input while parsing near '...se/webchannel-wrapper'
// TODO(you): code here to reproduce the problem
Hey there! I couldn't figure out what this issue is about, so I've labeled it for a human to triage. Hang tight.
Hmmm this issue does not seem to follow the issue template. Make sure you provide all the required information.
I ran npm cache clean --force and then npm i firebase.
Everything is fine now
Duplicate of #768. Please search for similar issues before opening an issue.
All data that passes through the cache is fully verified for integrity on both insertion and extraction. Cache corruption will either trigger an error, or signal to pacote that the data must be refetched, which it will do automatically. For this reason, it should never be necessary to clear the cache for any reason other than reclaiming disk space, thus why clean now requires --force to run.
The npm cache is strictly a cache: it should not be relied upon as a persistent and reliable data store for package data. npm makes no guarantee that a previously-cached piece of data will be available later, and will automatically delete corrupted contents. The primary guarantee that the cache makes is that, if it does return data, that data will be exactly the data that was inserted.
But based on several issues (pretty common I guess), npm cache's "corruption-proof" seem to be just assumptions, not reality. :'(
Most helpful comment
I ran npm cache clean --force and then npm i firebase.
Everything is fine now