Open wilsonlichina opened 6 years ago
删除 node_modules文件夹 和 package-lock.json 然后试试
npm cache clean --force
npm install --registry=https://registry.npm.taobao.org
我在win10中出现如下问题:
$ npm install
npm WARN deprecated bfj-node4@5.3.1: Switch to the `bfj` package for fixes and new features!
npm WARN deprecated circular-json@0.3.3: CircularJSON is in maintenance only, flatted is its successor.
npm ERR! Unexpected end of JSON input while parsing near '...ment":false,"tarball"'
npm ERR! A complete log of this run can be found in:
npm ERR! D:\Scoop\Applications\persist\nodejs-lts\cache\_logs\2018-11-13T14_03_48_296Z-debug.log
$ node -v
v10.13.0
$ npm -v
6.4.1
log文件
2394 silly saveTree `-- webpack@4.16.5
2395 verbose stack SyntaxError: Unexpected end of JSON input while parsing near '...ment":false,"tarball"'
2395 verbose stack at JSON.parse (<anonymous>)
2395 verbose stack at parseJson (D:\Scoop\Applications\apps\nodejs-lts\10.13.0\node_modules\npm\node_modules\json-parse-better-errors\index.js:7:17)
2395 verbose stack at consumeBody.call.then.buffer (D:\Scoop\Applications\apps\nodejs-lts\10.13.0\node_modules\npm\node_modules\node-fetch-npm\src\body.js:96:50)
2395 verbose stack at process._tickCallback (internal/process/next_tick.js:68:7)
2396 verbose cwd J:\Test\nodetest\vue-admin-template
2397 verbose Windows_NT 10.0.17134
2398 verbose argv "D:\\Scoop\\Applications\\apps\\nodejs-lts\\current\\node.exe" "D:\\Scoop\\Applications\\apps\\nodejs-lts\\current\\node_modules\\npm\\bin\\npm-cli.js" "install"
2399 verbose node v10.13.0
2400 verbose npm v6.4.1
2401 error Unexpected end of JSON input while parsing near '...ment":false,"tarball"'
2402 verbose exit [ 1, true ]
@fandean https://github.com/webpack-contrib/webpack-bundle-analyzer/issues/198
更新一下 webpack-bundle-analyzer
的版本
git clone之后 mac环境切换到vue-admin-template目录,按步骤执行
Install dependencies
npm install 时出现了以下错误,请帮忙解答以下,谢谢
2482 verbose stack SyntaxError: Unexpected end of JSON input while parsing near '...ugin/-/copy-webpack-p' 2482 verbose stack at JSON.parse ()
2482 verbose stack at parseJson (/usr/local/lib/node_modules/npm/node_modules/json-parse-better-errors/index.js:7:17)
2482 verbose stack at consumeBody.call.then.buffer (/usr/local/lib/node_modules/npm/node_modules/node-fetch-npm/src/body.js:96:50)
2482 verbose stack at
2482 verbose stack at process._tickCallback (internal/process/next_tick.js:189:7)
2483 verbose cwd /Users/wilsonli/Documents/project/Test/vue-admin-template
2484 verbose Darwin 17.7.0
2485 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "install"
2486 verbose node v8.12.0
2487 verbose npm v6.4.1
2488 error Unexpected end of JSON input while parsing near '...ugin/-/copy-webpack-p'
2489 verbose exit [ 1, true ]