[英]Error: Error parsing triggers: Cannot find module 'firebase-functions'
I've encountered following error message whenever I've tried most of solutions related to that message. 每当我尝试与该消息相关的大多数解决方案时,都会遇到以下错误消息。 Please let me know how to fix it.
请让我知道如何解决它。 I've just clone source of https://github.com/davideast/hnpwa-firebase/ and deploy to my firebase account.
我只是克隆了https://github.com/davideast/hnpwa-firebase/的源并将其部署到我的firebase帐户。
I've already installed npm install
inside functions
folder. 我已经在
functions
文件夹中安装了npm install
。
My NodeJS version is v7.0.0 我的NodeJS版本是v7.0.0
i deploying functions
i functions: running predeploy script.
> functions@ build /Users/user/Documents/Projects/firebase/hnpwa-firebase/functions
> tslint -p tslint.json && ./node_modules/.bin/tsc
typeof-compare is deprecated. Starting from TypeScript 2.2 the compiler includes this check which makes this rule redundant.
WARNING: /Users/user/Documents/Projects/firebase/hnpwa-firebase/functions/src/index.ts[1, 13]: 'functions' is declared but its value is never read.
✔ functions: Finished running predeploy script.
i functions: ensuring necessary APIs are enabled...
✔ functions: all necessary APIs are enabled
i functions: preparing dist/server directory for uploading...
Error: Error parsing triggers: Cannot find module 'firebase-functions'
Try running "npm install" in your functions directory before deploying.
Try to install with the -g or save-dev argument. 尝试使用-g或save-dev参数进行安装。
npm install -g firebase-functions
npm install --save-dev firebase-functions
npm install firebase-functions
this pretty much fixes all of my problems with not finding modules. 这几乎解决了我所有找不到模块的问题。 :D
:d
"dependencies": {
"firebase-admin": "5.4.0",
"firebase-functions": "0.7.0"
}
I've found solution that we're about to upgrade both dependencies firebase-admin
and firebase-functions
as follow. 我找到了将要升级依赖项
firebase-admin
和firebase-functions
解决方案,如下所示。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.