Leo*_*Leo 9 firebase google-cloud-functions firebase-admin
继续尝试重新开始firebase serve工作。我只是问了这个问题(得到了很好的答复,谢谢):
npm ERR!对等部门丢失:firebase-admin @ ^ 7.0.0,firebase-functions @ 2.3.1要求
在做npm list firebase-admin我现在看到预期的输出-- firebase-admin@7.3.0。
但是firebase serve仍然无法正常工作。我得到这个:
! Your requested "node" version "6" doesn't match your global version "10"
...
! 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)
Run Code Online (Sandbox Code Playgroud)
因此firebase serve仍然看不到firebase-admin模块。到底是怎么回事?我该怎么办?
看来此问题现在与您在本地安装的Node版本有关。
我不知道答案到底是什么,但是开始四处查看节点版本。
在functions / package.json中-可能需要指定要使用的节点版本(https://firebase.google.com/docs/functions/manage-functions):
// functions/package.json
{
"name": ...,
"scripts": ...,
"dependencies": ...,
"engines": {
"node": "10"
}
}Run Code Online (Sandbox Code Playgroud)
请注意,Node 10仍在Firebase上处于beta版。
希望这可以帮助您正确解决问题。
| 归档时间: |
|
| 查看次数: |
3722 次 |
| 最近记录: |