npm ERR! Unexpected end of JSON input while parsing near '...es":{"delegates":"^0.'

在安装sass-loader和node-sass时报错,运行npm cache clean --force 后再进行安装,就没有报错了

错误:

C:\Users\dell\Desktop\webpackdemo\webpack1>npm install sass-loader node-sass --save-dev
npm ERR! Unexpected end of JSON input while parsing near '...es":{"delegates":"^0.'

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\dell\AppData\Roaming\npm-cache\_logs\2019-06-16T09_45_37_440Z-debug.log

C:\Users\dell\Desktop\webpackdemo\webpack1>npm cache clean
npm ERR! As of npm@5, the npm cache self-heals from corruption issues and data extracted from the cache is guaranteed to be valid. If you want to make sure everything is consistent, use 'npm cache verify' instead.
npm ERR!
npm ERR! If you're sure you want to delete the entire cache, rerun this command with --force.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\dell\AppData\Roaming\npm-cache\_logs\2019-06-16T09_48_05_373Z-debug.log

npm ERR! Unexpected end of JSON input while parsing near '...es

你可能感兴趣的:(Webpack)