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 ]
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
windows下使用cnpm可以规避很多奇怪的问题
可能网络出问题了,看提示,打开log文件看看具体原因.