Recently my NPM hair smoke like, install various dependencies appear various error, directly record.
The problem
NPM install failed to execute on the console:
npm ERR! Unexpected end of JSON input while parsing near '... 7839d064dd0d46cd1b88e' npm ERR! A complete log of this run can be found in: npm ERR! E:\DeveloperTool\nodejs\node_cache\_logs\2021-01-04T08_02_35_882Z-debug.logCopy the code
The error screenshot is as follows:
To solve
- Clear the cache
npm cache clean --force
Copy the code
Note: Clear cache may take some time, be patient ~
- reinstall
npm install
Copy the code
3. Trynpm run dev
The server started successfully!