I get this error whenever I NPM install react-router-dom in vs code:
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
This solved it for me
npm cache clean --force
then run
npm i react-router-dom
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.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.