gpt4 book ai didi

node.js - 错误 : Error parsing triggers: Cannot find module 'firebase-functions'

转载 作者:搜寻专家 更新时间:2023-11-01 00:28:30 26 4
gpt4 key购买 nike

每当我尝试与该消息相关的大多数解决方案时,我都会遇到以下错误消息。请让我知道如何解决它。我刚刚克隆了 https://github.com/davideast/hnpwa-firebase/ 的源代码并部署到我的 firebase 帐户。

我已经在 functions 文件夹中安装了 npm install

我的 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.

最佳答案

尝试使用 -g 或 save-dev 参数安装。

npm install -g firebase-functions

npm install --save-dev firebase-functions

npm install firebase-functions

这几乎解决了我找不到模块的所有问题。 :D

关于node.js - 错误 : Error parsing triggers: Cannot find module 'firebase-functions' ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48279285/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com