i am trying to resolve this error from a long time and i had asked this lots of time but not able to remove this i am trying to add mysql dependencies in reactjs i am running
npm install mysql
but its giving me
npm ERR! Unexpected end of JSON input while parsing near '....tgz"},"engines":{"no' npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\HP\AppData\Roaming\npm-cache\_logs\2018-06- 22T01_58_05_155Z-debug.log
i uninstalled my npm and install it again and try to run npm install --save react-router-dom now its saying
npm install --save react-router-dom npm WARN deprecated istanbul-lib-hook@1.2.1: 1.2.0 should have been a major version bump npm ERR! Unexpected end of JSON input while parsing near '...9a3f270fa24dbccdd5014' npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\HP\AppData\Roaming\npm-cache\_logs\2018-06-26T18_57_32_102Z-debug.log
2 Answers
Answers 1
Your package.json
file has a syntax error. For finding the error use JSON validator, for example, jsonlint.com. Also, every modern IDE has auto-validating features.
Answers 2
This solved it for me:
1. Clean your npm cache
run this command in your project root folder:
npm cache clean --force
2. Delete package.lock.json
3. Delete node_modules folder
run again
npm install
0 comments:
Post a Comment