npm 404找不到,知名软件包

时间:2020-02-11 22:12:10

标签: npm npm-install

尝试使用npm安装7zip-bin软件包,出现此错误:

npm ERR! code E404
npm ERR! 404 Not Found: 7zip-bin@5.0.3

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/user/.npm/_logs/2020-02-11T22_06_51_357Z-debug.log

在日志文件中,我看到以下输出:

0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node',
1 verbose cli   '/usr/local/bin/npm',
1 verbose cli   'install',
1 verbose cli   '-g',
1 verbose cli   '7zip-bin@5.0.3' ]
2 info using npm@6.4.1
3 info using node@v8.15.0
4 verbose npm-session 57413e14b663097a
5 silly install loadCurrentTree
6 silly install readGlobalPackageData
7 http fetch GET 404 https://registry.npmjs.org/7zip-bin 522ms
8 silly fetchPackageMetaData error for 7zip-bin@5.0.3 404 Not Found: 7zip-bin@5.0.3
9 timing stage:rollbackFailedOptional Completed in 0ms
10 timing stage:runTopLevelLifecycles Completed in 745ms
11 verbose stack Error: 404 Not Found: 7zip-bin@5.0.3
11 verbose stack     at fetch.then.res (/usr/local/lib/node_modules/npm/node_modules/pacote/lib/fetchers/registry/fetch.js:42:19)
11 verbose stack     at tryCatcher (/usr/local/lib/node_modules/npm/node_modules/bluebird/js/release/util.js:16:23)
11 verbose stack     at Promise._settlePromiseFromHandler (/usr/local/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:512:31)
11 verbose stack     at Promise._settlePromise (/usr/local/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:569:18)
11 verbose stack     at Promise._settlePromise0 (/usr/local/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:614:10)
11 verbose stack     at Promise._settlePromises (/usr/local/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:693:18)
11 verbose stack     at Async._drainQueue (/usr/local/lib/node_modules/npm/node_modules/bluebird/js/release/async.js:133:16)
11 verbose stack     at Async._drainQueues (/usr/local/lib/node_modules/npm/node_modules/bluebird/js/release/async.js:143:10)
11 verbose stack     at Immediate.Async.drainQueues (/usr/local/lib/node_modules/npm/node_modules/bluebird/js/release/async.js:17:14)
11 verbose stack     at runCallback (timers.js:810:20)
11 verbose stack     at tryOnImmediate (timers.js:768:5)
11 verbose stack     at processImmediate [as _immediateCallback] (timers.js:745:5)
12 verbose cwd /Users/user/Projects/fotomaster.com/mosaicpresentation
13 verbose Darwin 18.7.0
14 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "7zip-bin"
15 verbose node v8.15.0
16 verbose npm  v6.4.1
17 error code E404
18 error 404 Not Found: 7zip-bin@5.0.3
19 verbose exit [ 1, true ]

我知道我已经安装了此软件包,并且没有做任何卸载工作。 我想念什么?

4 个答案:

答案 0 :(得分:3)

reference至github纱issue#7902

registry=https://yarn.npmjs.org添加到文件〜/ .npmrc 。 这为我解决了这个问题。

答案 1 :(得分:0)

得到同样的错误。我改用yarn add安装了模块。您可以检查您的包裹中是否包含yarn.lock文件?

答案 2 :(得分:0)

相同的问题,添加了显式的dev依赖关系可以解决此问题,但看起来像个错误

答案 3 :(得分:0)

其他解决方案对我不起作用

对我来说,问题出在npm( 6.4.1 )上的版本已过时
更新至 6.13.4 对其进行了修复