鍍金池/ 問答/數(shù)據(jù)庫  網(wǎng)絡安全/ npm安裝mongoose時出錯

npm安裝mongoose時出錯

圖片描述
請問這是怎么回事?

下面是提示文件

0 info it worked if it ends with ok
1 verbose cli [ 'C:\Program Files\nodejs\node.exe',
1 verbose cli 'C:\Users\acer\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js',
1 verbose cli 'install',
1 verbose cli 'mongoose',
1 verbose cli '--save' ]
2 info using npm@5.5.1
3 info using node@v8.9.0
4 verbose npm-session e7c8c066a086bbc2
5 silly install loadCurrentTree
6 silly install readLocalPackageData
7 http fetch GET 304 https://registry.npm.taobao.o... 266ms (from cache)
8 silly fetchPackageMetaData error for mongoose@latest Unexpected end of JSON input while parsing near '...goose","version":"2.9'
9 verbose stack SyntaxError: Unexpected end of JSON input while parsing near '...goose","version":"2.9'
9 verbose stack at JSON.parse (<anonymous>)
9 verbose stack at parseJson (C:UsersacerAppDataRoamingnpmnode_modulesnpmnode_modulespacotenode_modulesmake-fetch-happennode_modulesnode-fetch-npmnode_modulesjson-parse-better-errorsindex.js:7:17)
9 verbose stack at consumeBody.call.then.buffer (C:UsersacerAppDataRoamingnpmnode_modulesnpmnode_modulespacotenode_modulesmake-fetch-happennode_modulesnode-fetch-npmsrcbody.js:96:50)
9 verbose stack at <anonymous>
9 verbose stack at process._tickCallback (internal/process/next_tick.js:188:7)
10 verbose cwd F:workspacesBlog-Project
11 verbose Windows_NT 10.0.15063
12 verbose argv "C:\Program Files\nodejs\node.exe" "C:\Users\acer\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js" "install" "mongoose" "--save"
13 verbose node v8.9.0
14 verbose npm v5.5.1
15 error Unexpected end of JSON input while parsing near '...goose","version":"2.9'
16 verbose exit [ 1, true ]

回答
編輯回答
解夏

windows下使用cnpm可以規(guī)避很多奇怪的問題

2017年4月19日 15:28
編輯回答
還吻

可能網(wǎng)絡出問題了,看提示,打開log文件看看具體原因.

2018年3月15日 13:51