我已经下载了一个完整的项目,现在已经使用了大约一年,我得到了一台新电脑,并试图上传一个功能的更改。我遇到了错误,现在我正在尝试重新部署一个我知道可以工作并且与Google Cloud中的源代码相同的函数。
我运行:
firebase deploy --only functions:generateThumbnail这是输出:
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:
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
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仍然收到与之前相同的错误:
Error: Error parsing triggers: Cannot find module './dnssec'发布于 2018-08-13 11:56:11
嘿,所以我认为这是npm没有正确更新包的问题。我也遇到了同样的错误。
Error: Error parsing triggers: Cannot find module './dnssec'我发现dnssec资源在'sshpk‘node module文件夹中。所以为了让纠正这个错误,我只是进入我的functions目录的node_modules文件夹,然后删除了'sshpk‘模块,当它还在functions目录中时,运行了'npm ’。希望这对你和其他遇到这个问题的人都有效。
干杯。祝好运!
https://stackoverflow.com/questions/51586894
复制相似问题