新的mac用户来了。我试图在phpstorm (laravel/laravel)中创建一个作曲家项目,但是每次我运行npm install
时,这个过程都会陷入以下情况:
npm timing idealTree:userRequests Completed in 0ms
⸨⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⸩ ⠸ idealTree:stuttard_staging: sill idealTree buildDeps
完全错误报告(冻结10分钟后):
npm timing idealTree:buildDeps Completed in 1181143ms
npm timing idealTree:fixDepFlags Completed in 1ms
npm timing idealTree Completed in 1181150ms
npm timing command:i Completed in 1181156ms
npm verb type system
npm verb stack FetchError: request to http://registry.npmjs.org/axios failed, reason: connect ETIMEDOUT 2606:4700::6810:1123:80
npm verb stack at ClientRequest.<anonymous> (/opt/homebrew/lib/node_modules/npm/node_modules/minipass-fetch/lib/index.js:110:14)
npm verb stack at ClientRequest.emit (node:events:390:28)
npm verb stack at Socket.socketErrorListener (node:_http_client:447:9)
npm verb stack at Socket.emit (node:events:402:35)
npm verb stack at emitErrorNT (node:internal/streams/destroy:164:8)
npm verb stack at emitErrorCloseNT (node:internal/streams/destroy:129:3)
npm verb stack at processTicksAndRejections (node:internal/process/task_queues:83:21)
npm verb cwd /Users/artur/PhpstormProjects/stuttard_staging
npm verb Darwin 20.6.0
npm verb argv "/opt/homebrew/Cellar/node/17.2.0/bin/node" "/opt/homebrew/bin/npm" "i" "--verbose"
npm verb node v17.2.0
npm verb npm v8.1.4
npm ERR! code ETIMEDOUT
npm ERR! syscall connect
npm ERR! errno ETIMEDOUT
npm ERR! network request to http://registry.npmjs.org/axios failed, reason: connect ETIMEDOUT 2606:4700::6810:1123:80
npm ERR! network This is a problem related to network connectivity.
npm ERR! network In most cases you are behind a proxy or have bad network settings.
npm ERR! network
npm ERR! network If you are behind a proxy, please make sure that the
npm ERR! network 'proxy' config is set properly. See: 'npm help config'
npm verb exit 1
npm timing npm Completed in 1181269ms
npm verb unfinished npm timer reify 1638537601466
npm verb unfinished npm timer reify:loadTrees 1638537601470
npm verb code 1
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/artur/.npm/_logs/2021-12-03T13_39_42_628Z-debug.log
这个问题似乎存在多年来节点版本的14+
。我将node 17.2
与npm 8.1.4
结合使用,而且似乎仍然能理解它。有些线程告诉删除我没有的package-lock.json
文件夹。
我尝试过配置注册表:
npm config set registry http://registry.npmjs.org/
或清除缓存:
npm cache clear --force
但似乎什么也帮不上忙。我尝试了这些线程中提供的所有解决方案,但都没有成功:
这可能是我的网络配置的问题吗?就像我说的,我是麦克·诺布。有办法查一下吗?
编辑:
我能够通过降级到古老的软件来让它开始工作:
node 14.17.4
npm 6.14.14
这只是一个暂时的修复,我想知道如何使它与当前的软件版本一起工作。
发布于 2022-02-21 04:35:37
在将节点升级到v16后,我遇到了一些问题。
删除~/.npmrc
和~/.node/etc/npmrc
文件中的所有配置,修复此问题。
https://stackoverflow.com/questions/70215399
复制相似问题