【问题标题】:Fail to install firebase module on node js: error 404无法在节点 js 上安装 firebase 模块:错误 404
【发布时间】:2018-09-19 23:28:04
【问题描述】:

我想在我的 react 应用中使用 firebase。 我是 react 新手,所以我使用本教程创建了我的 react 应用程序: https://reactjs.org/tutorial/tutorial.html

我有: 节点js版本:v8.9.4 npm 版本:5.6.0

我正在跑步:

npm install --save firebase

得到:

npm ERR! code E404
npm ERR! 404 Not Found: @firebase/app@0.1.10

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\...\Roaming\npm-cache\_logs\2018-04-10T10_44_12_593Z-debug.log

这是我的 json 包:

{
"name": "profile-editor",
"version": "0.1.0",
"private": true,
"dependencies": {
"react": "^16.3.1",
"react-dom": "^16.3.1",
"react-editable-json-tree": "^2.2.0",
"react-firebase": "^2.2.8",
"react-json-edit": "^0.3.1",
"react-scripts": "1.1.1",
"update-notifier": "^2.4.0"
  },
"scripts": {
"start": "set PORT=3006 && react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test --env=jsdom",
"eject": "react-scripts eject"
  }
}

我和朋友核实了一下,他可以下载这个模块(使用较旧的 node js 版本)。我从我的家庭网络和手机的热点尝试了这个命令,以防网络问题。同样的错误。这很奇怪!有什么建议?

【问题讨论】:

    标签: node.js reactjs firebase npm


    【解决方案1】:

    我刚试过

    npm install firebase --save
    

    再次(感谢 Dhana),3 个月后,甚至没有更新节点(我很确定我当时尝试过),它起作用了。还是个谜。

    【讨论】:

      【解决方案2】:

      我也遇到了同样的问题,我已经使用

      更新了我的节点 js
          npm update node
      

      然后尝试

        npm install firebase --save
      

      下面是我遇到的错误图片和修复方法。

      谢谢

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 2018-03-08
        • 2019-01-08
        • 1970-01-01
        • 2020-06-27
        • 1970-01-01
        • 2015-01-31
        • 1970-01-01
        相关资源
        最近更新 更多