我正在尝试将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)发布于 2018-05-30 11:36:48
看起来这是一个全新的NPM问题:https://github.com/dcodeIO/protobuf.js/issues/1056
这里有一个解决方法:npm install --registry=https://registry.npm.taobao.org
https://stackoverflow.com/questions/50595961
复制相似问题