首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >分析触发器时出错:找不到模块'google-auth-library‘

分析触发器时出错:找不到模块'google-auth-library‘
EN

Stack Overflow用户
提问于 2018-07-30 12:14:36
回答 1查看 521关注 0票数 0

我已经下载了一个完整的项目,现在已经使用了大约一年,我得到了一台新电脑,并试图上传一个功能的更改。我遇到了错误,现在我正在尝试重新部署一个我知道可以工作并且与Google Cloud中的源代码相同的函数。

我运行:

代码语言:javascript
复制
firebase deploy --only functions:generateThumbnail

这是输出:

代码语言:javascript
复制
  deploying functions
i  functions: ensuring necessary APIs are enabled...
✔  functions: all necessary APIs are enabled
i  functions: preparing functions directory for uploading...

Error: Error parsing triggers: Cannot find module './dnssec'

Try running "npm install" in your functions directory before deploying.

我运行npm install:

代码语言:javascript
复制
npm WARN functions@ requires a peer of eslint@2.x but none is installed.         You must install peer dependencies yourself.
npm WARN ajv-keywords@3.2.0 requires a peer of ajv@^6.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN firebase-functions@0.8.2 requires a peer of firebase-admin@~5.10.0 but none is installed. You must install peer dependencies yourself.

audited 7867 packages in 6.019s
found 20 vulnerabilities (3 low, 17 moderate)
  run `npm audit fix` to fix them, or `npm audit` for details

然后我运行了npm audit fix

代码语言:javascript
复制
npm WARN functions@ requires a peer of eslint@2.x but none is installed. You must install peer dependencies yourself.
npm WARN ajv-keywords@3.2.0 requires a peer of ajv@^6.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN firebase-functions@0.8.2 requires a peer of firebase-admin@~5.10.0 but none is installed. You must install peer dependencies yourself.

removed 1 package and updated 5 packages in 7.583s
fixed 8 of 20 vulnerabilities in 7867 scanned packages
  2 package updates for 12 vulns involved breaking changes
  (use `npm audit fix --force` to install breaking changes; or do it by hand)

..I仍然收到与之前相同的错误:

代码语言:javascript
复制
Error: Error parsing triggers: Cannot find module './dnssec'
EN

回答 1

Stack Overflow用户

发布于 2018-08-13 11:56:11

嘿,所以我认为这是npm没有正确更新包的问题。我也遇到了同样的错误。

代码语言:javascript
复制
Error: Error parsing triggers: Cannot find module './dnssec'

我发现dnssec资源在'sshpk‘node module文件夹中。所以为了让纠正这个错误,我只是进入我的functions目录的node_modules文件夹,然后删除了'sshpk‘模块,当它还在functions目录中时,运行了'npm ’。希望这对你和其他遇到这个问题的人都有效。

干杯。祝好运!

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/51586894

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档