$ npm install [email protected] --save npm ERR! Unexpected end of JSON input while parsing near '...TzfxLvz8PuwMlgQXO+TPr'
npm ERR! A complete log of this run can be found in: npm ERR!
C:\Users\PACHU\AppData\Roaming\npm-cache_logs\2018-06-14T05_43_34_319Z-debug.log
0
votes
this can happen if you try to install older packages on higher version of node
- Manoz
5 Answers
3
votes
Seems you have some broken dependencies or caching problem. So first, delete your node_module, then delete your package-lock.json and yarn.lock.
`rm -rf node_modules`
`rm -ef package-lock.json`
`rm -rf yarn.lock`
You can clear npm cache using the following command
npm cache clean --force
npm cache verify
You can also clean yarn cache using
yarn cache clean
Then close your current terminal and open a new one. Finally, install your dependencies again using
npm install react-router-dom --save or yarn add react-router-dom --save
0
votes