找不到404:protobufjs@^5.0.0

时间:2018-05-30 03:29:11

标签: reactjs npm npm-install protobufjs

我试图将firebase安装到我的项目中:

>npm install -S firebase
npm ERR! code E404
npm ERR! 404 Not Found: protobufjs@^5.0.0

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/my_username/.npm/_logs/2018-05-30T03_26_22_054Z-debug.log

什么是404 Not Found: protobufjs@^5.0.0以及如何解决此问题?

在日志中我看到了:

83 verbose stack Error: 404 Not Found: protobufjs@^5.0.0
83 verbose stack     at fetch.then.res (/usr/local/lib/node_modules/npm/node_modules/pacote/lib/fetchers/registry/fetch.js:42:19)
83 verbose stack     at tryCatcher (/usr/local/lib/node_modules/npm/node_modules/bluebird/js/release/util.js:16:23)
83 verbose stack     at Promise._settlePromiseFromHandler (/usr/local/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:512:31)
83 verbose stack     at Promise._settlePromise (/usr/local/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:569:18)
83 verbose stack     at Promise._settlePromise0 (/usr/local/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:614:10)
83 verbose stack     at Promise._settlePromises (/usr/local/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:693:18)
83 verbose stack     at Async._drainQueue (/usr/local/lib/node_modules/npm/node_modules/bluebird/js/release/async.js:133:16)
83 verbose stack     at Async._drainQueues (/usr/local/lib/node_modules/npm/node_modules/bluebird/js/release/async.js:143:10)
83 verbose stack     at Immediate.Async.drainQueues (/usr/local/lib/node_modules/npm/node_modules/bluebird/js/release/async.js:17:14)
83 verbose stack     at runCallback (timers.js:649:20)
83 verbose stack     at tryOnImmediate (timers.js:622:5)
83 verbose stack     at processImmediate [as _immediateCallback] (timers.js:594:5)

1 个答案:

答案 0 :(得分:1)

看起来这是NPM的一个全新问题: https://github.com/dcodeIO/protobuf.js/issues/1056

这是一个解决方法:npm install --registry=https://registry.npm.taobao.org