伍佰目录 短网址
  当前位置:海洋目录网 » 站长资讯 » 站长资讯 » 文章详细 订阅RssFeed

运行npm install 时,卡在sill install loadAllDepsIntoIdealTree不动

来源:本站原创 浏览:134次 时间:2021-09-03

我有一个Node.js应用程序。当我尝试运行时,npm install它与此挂起:

loadIdealTree:loadAllDepsIntoIdealTree: sill install loadIdealTree
npm install --verbose 给了我一些额外的信息:

npm info it worked if it ends with ok
npm verb cli [ ‘/us��������,��������r/local/bin/node’,
npm verb cli ‘/usr/local/bin/npm’,
npm verb cli ‘install’,
npm verb cli ‘–verbose’,
npm verb cli ‘aws-sdk-js’ ]
npm info using npm@5.8.0
npm info using node@v8.9.2
npm verb npm-session ea38310110279de7
npm http fetch GET 404 https://registry.npmjs.org/aws-sdk-js 2211ms
npm verb stack Error: 404 Not Found: aws-sdk-js@latest
npm verb stack at fetch.then.res (/usr/local/lib/node_modules/npm/node_modules/pacote/lib/fetchers/registry/fetch.js:42:19)
npm verb stack at tryCatcher (/usr/local/lib/node_modules/npm/node_modules/bluebird/js/release/util.js:16:23)
npm verb stack at Promise._settlePromiseFromHandler (/usr/local/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:512:31)
npm verb stack at Promise._settlePromise (/usr/local/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:569:18)
npm verb stack at Promise._settlePromise0 (/usr/local/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:614:10)
npm verb stack at Promise._settlePromises (/usr/local/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:693:18)
npm verb stack at Async._drainQueue (/usr/local/lib/node_modules/npm/node_modules/bluebird/js/release/async.js:133:16)
npm verb stack at Async._drainQueues (/usr/local/lib/node_modules/npm/node_modules/bluebird/js/release/async.js:143:10)
npm verb stack at Immediate.Async.drainQueues (/usr/local/lib/node_modules/npm/node_modules/bluebird/js/release/async.js:17:14)
npm verb stack at runCallback (timers.js:789:20)
npm verb stack at tryOnImmediate (timers.js:751:5)
npm verb stack at processImmediate [as _immediateCallback] (timers.js:722:5)
npm verb cwd /Users/me/git/aws-sdk-js-perf
npm verb Darwin 17.5.0
npm verb argv “/usr/local/bin/node” “/usr/local/bin/npm” “install” “–verbose” “aws-sdk-js”
npm verb node v8.9.2
npm verb npm v5.8.0
npm ERR! code E404
npm ERR! 404 Not Found: aws-sdk-js@latest
npm verb exit [ 1, true ]

npm ERR! A complete log of this run can be found in:
npm ERR! /Users/me/.npm/_logs/2018-05-24T10_30_55_688Z-debug.log
我遇到了其他人遇到这种情况的情况,但以下情况似乎可以解决他们的问题。它不能解决我的问题:

npm set registry http://registry.npmjs.org/

遇到了同样的问题,此评论在这里为我解决了:

Try to remove ‘package-lock.json’ file from directory where ‘package.json’ locate.

//本次从淘宝仓库源下载
npm --registry=https://registry.npm.taobao.org install
使用cnpm命令代替npm
使用cnpm命令代替npm

// 安装cnpm命令,不会改变npm的源
npm install -g cnpm --registry=https://registry.npm.taobao.org

//使用
cnpm install
修改npm的源
设置npm的源,可以设置多个源,但是只有一个是生效的

//设置淘宝源
npm config set registry https://registry.npm.taobao.org

//设置公司的源
npm config set registry http://127.0.0.1:4873

//查看源,可以看到设置过的所有的源
npm config get registry
修改npm配置文件
编辑 ~/.npmrc 加入下面内容

registry = https://registry.npm.taobao.org

  推荐站点

  • At-lib分类目录At-lib分类目录

    At-lib网站分类目录汇集全国所有高质量网站,是中国权威的中文网站分类目录,给站长提供免费网址目录提交收录和推荐最新最全的优秀网站大全是名站导航之家

    www.at-lib.cn
  • 中国链接目录中国链接目录

    中国链接目录简称链接目录,是收录优秀网站和淘宝网店的网站分类目录,为您提供优质的网址导航服务,也是网店进行收录推广,站长免费推广网站、加快百度收录、增加友情链接和网站外链的平台。

    www.cnlink.org
  • 35目录网35目录网

    35目录免费收录各类优秀网站,全力打造互动式网站目录,提供网站分类目录检索,关键字搜索功能。欢迎您向35目录推荐、提交优秀网站。

    www.35mulu.com
  • 就要爱网站目录就要爱网站目录

    就要爱网站目录,按主题和类别列出网站。所有提交的网站都经过人工审查,确保质量和无垃圾邮件的结果。

    www.912219.com
  • 伍佰目录伍佰目录

    伍佰网站目录免费收录各类优秀网站,全力打造互动式网站目录,提供网站分类目录检索,关键字搜索功能。欢迎您向伍佰目录推荐、提交优秀网站。

    www.wbwb.net