我已经下载了一个已经使用了大约一年的完整项目,我有一台新计算机,并且正在尝试将更改上传到某个功能。我遇到了错误,现在我想重新部署一个我知道有效的功能,该功能与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)
..我仍然收到与以前相同的错误:
Error: Error parsing triggers: Cannot find module './dnssec'
答案 0 :(得分:0)
嘿,所以我认为这是npm无法正确更新软件包的问题。我遇到了同样的错误。
field
我发现dnssec资源位于“ sshpk”节点模块文件夹中。因此,为了更正错误,我只是进入了函数目录的node_modules文件夹,并删除了“ sshpk”模块,并且仍然在函数目录中运行了“ npm install” 。希望这对您和遇到此问题的其他人有用。
干杯。祝你好运!