npm WARN tar ENOENT: no such file or directory, open 'C:{{File_Location}}\node_modules.staging\mocha-20835964\lib\browser\progress.js'
and Error message as npm ERR! Unexpected end of JSON input while parsing near '...int-stylish":"~0.1.3"'
I am trying the command npm-install in visual studio above is the error which I am getting.Please help me for the same.
delete package-lock.json
first.
navigate to the root folder of your project and npm cache clean --force
, then try npm install
What happen for me to get this error was when I runned npm i
and closed or stopped before it was finished. Then to try to "fix" it, I deleted the node_modules
folder and runned npm i
again and started getting this error.
And the reason why this happens and npm cache clean --force
fixes the problem is that npm have a cache on the files that it have already downloaded, but when I remove node_modules
, it can't find the files name that are cached and should be in the node_modules
and gives this error/warning.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With