NPM安装挂在loadRequestedDeps上 [英] NPM install hangs on loadRequestedDeps
问题描述
当我使用NPM下载任何软件包时,它会挂在最后一个命令"loadRequestedDeps"上.我已将整个-verbose
输出添加到此问题的末尾以供参考.它会一直坐在那里直到我取消命令,然后什么也不会安装,而且package.json不会被更新.
When I download any package using NPM, it hangs on the last command "loadRequestedDeps." I've added my whole -verbose
output to the end of this question for reference. It will just sit there until I cancel the command, and nothing will be installed and my package.json will not be updated.
问题可能是什么?我已经环顾四周,但还没有找到解决特定问题的方法.
What could the issue be? I've looked around but haven't found out how to fix my particular problem.
以下是一些信息:
- 操作系统是Windows 10
- 节点版本为6.9.1
- NPM版本为3.10.8
- 每当我运行NPM安装时,我的CPU都将以100%的速度运行.可能是问题本身吗?但是,我以前可以在这台计算机上使用NPM安装.
感谢任何可以提供帮助的人.详细输出如下.
Thanks for anyone who can help. The verbose output is below.
npm info it worked if it ends with ok
npm info using npm@3.10.8
npm info using node@v6.9.1
npm info ok
npm info it worked if it ends with ok
npm verb cli [ 'C:\\Program Files\\nodejs\\node.exe',
npm verb cli 'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
npm verb cli 'install',
npm verb cli 'moment',
npm verb cli '--save',
npm verb cli '-verbose' ]
npm info using npm@3.10.8
npm info using node@v6.9.1
npm verb request uri https://registry.npmjs.org/moment
npm verb request no auth needed
npm info attempt registry request try #1 at 11:19:11 AM
npm verb request id 6aa9ece5a04fcd33
npm verb etag W/"583b0871-194b0"
npm verb lastModified Sun, 27 Nov 2016 16:23:13 GMT
npm http request GET https://registry.npmjs.org/moment
npm http 304 https://registry.npmjs.org/moment
npm verb headers { date: 'Tue, 29 Nov 2016 19:19:02 GMT',
npm verb headers via: '1.1 varnish',
npm verb headers 'cache-control': 'max-age=300',
npm verb headers etag: 'W/"583b0871-194b0"',
npm verb headers age: '11',
npm verb headers connection: 'keep-alive',
npm verb headers 'x-served-by': 'cache-sjc3136-SJC',
npm verb headers 'x-cache': 'HIT',
npm verb headers 'x-cache-hits': '1',
npm verb headers 'x-timer': 'S1480447142.653125,VS0,VE0',
npm verb headers vary: 'Accept-Encoding' }
npm verb etag https://registry.npmjs.org/moment from cache
npm verb get saving moment to C:\Users\Zach\AppData\Roaming\npm-cache\registry.npmjs.org\moment\.cache.json
npm verb correctMkdir C:\Users\Zach\AppData\Roaming\npm-cache correctMkdir not in flight; initializing
npm verb cache add spec moment
npm verb addNamed "latest" is being treated as a dist-tag for moment
npm info addNameTag [ 'moment', 'latest' ]
npm verb addNameTag registry:https://registry.npmjs.org/moment not in flight; fetching
npm verb get https://registry.npmjs.org/moment not expired, no request
npm verb addNamed "2.17.0" is a plain semver version for moment
npm verb addRemoteTarball https://registry.npmjs.org/moment/-/moment-2.17.0.tgz not in flight; adding
npm verb addRemoteTarball [ 'https://registry.npmjs.org/moment/-/moment-2.17.0.tgz',
npm verb addRemoteTarball 'a4c292e02aac5ddefb29a6eed24f51938dd3b74f' ]
[ ..............] \ loadRequestedDeps: verb addRemoteTarball [ 'https://registry.npmjs.org/moment/-/moment-2.17.0.tgz',
推荐答案
因此,在尝试清除npm缓存后,更新了我的npm和节点版本,重新安装了npm和节点,等等...我发现更改了我的环境变量TEMP
到= C:\tmp
起作用.我不知道为什么.任何信息都很好.
So, after trying to clear the npm cache, update my npm and node version, reinstalling npm and node, etc... I found that changing my Environment Variable TEMP
to = C:\tmp
worked. I'm not sure why. Any info would be nice.
我从此线程找到了答案: npm安装在设置了多个临时目录的Windows上挂起
I found the answer from this thread: npm install hangs on windows with multiple temp directories set
注意:我可以使用他使用的方法(在目录中使用set
命令,但是我必须对每个新项目都执行此操作.通过System
,Advanced System Settings
,Environment Variables
更改变量已更改)很高兴,所以现在我一切都好.
NOTE: I could use the method he uses (using the set
command on my directory, but I had to do this with every new project. Changing the variable via System
, Advanced System Settings
, Environment Variables
changed it globablly, so now I'm all good to go.
这篇关于NPM安装挂在loadRequestedDeps上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!