【发布时间】:2019-09-27 19:30:51
【问题描述】:
我正在尝试了解如何获取所需的 firebase-admin 版本。我的情况是这样的:
MYPATH\functions>npm list firebase-admin
functions@ MYPATH\functions
`-- UNMET PEER DEPENDENCY firebase-admin@6.5.1
npm ERR! peer dep missing: firebase-admin@^7.0.0, required by firebase-functions@2.3.1
运行npm update firebase-admin 不会改变任何东西。
package.json 包含这一行:
"dependencies": {
...
"firebase-admin": "^6.5.1",
我该怎么办?
更新:
在执行firebase serve 时出现此错误:
! Your requested "node" version "6" doesn't match your global version "10"
....
+ hosting: Local server: http://localhost:5000
! The Cloud Functions emulator requires the module "firebase-admin" to be installed. This package is in your package.json, but it's not available. You probably need to run "npm install" in your functions directory.
i functions: Your functions could not be parsed due to an issue with your node_modules (see above)
【问题讨论】:
标签: firebase npm google-cloud-functions