2
votes

I get this error whenever I NPM install react-router-dom in vs code:

enter image description here

npm ERR! Unexpected end of JSON input while parsing near '...stack-launcher":"^1.0'

npm ERR! A complete log of this run can be found in: npm ERR!
C:\Users\HP\AppData\Roaming\npm-cache_logs\2019-03-18T09_03_43_417Z-debug.log

1
can you put your package.json ? seems that there is a typo error - jgoday

1 Answers

4
votes

Seems like you missed a comma after '...stack-launcher":"^1.0' in the package.json file.

If not delete the node_modules folder, delete package-lock.json file, run npm cache clean --force and try to re-install.