2

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

4b0
  • 21,981
  • 30
  • 95
  • 142
knightwalkha
  • 43
  • 1
  • 4
  • Possible duplicate of [NPM Install Error:Unexpected end of JSON input while parsing near '...nt-webpack-plugin":"0'](https://stackoverflow.com/questions/47675478/npm-install-errorunexpected-end-of-json-input-while-parsing-near-nt-webpack) – Ishwar Patil Mar 18 '19 at 09:11
  • can you put your package.json ? seems that there is a typo error – jgoday Mar 18 '19 at 09:11

1 Answers1

4

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.

Lasithe
  • 1,916
  • 1
  • 15
  • 20