Firebase CLI不部署

问题描述 投票:0回答:1

我刚刚在我的电脑上安装了firebase CLI - windows 10。

然而,当运行 npm install 在功能栏里,我得到这样的警告:

npm WARN [email protected] requires a peer of actions-on-google@^2.1.3 but none is installed. You must install peer dependencies yourself.


audited 975 packages in 6.407s

30 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities

我照做了... 但当我尝试部署项目时,我得到了这个错误... ...

=== Deploying to 'udemy-demo-assistant-59b6a'...

i  deploying functions
i  functions: ensuring required API cloudfunctions.googleapis.com is enabled...
+  functions: required API cloudfunctions.googleapis.com is enabled
i  functions: preparing functions directory for uploading...

Error: Error parsing triggers: Cannot find module 'actions-on-google'
Require stack:
- C:\Users\Michael\Desktop\Udemy\firebase\functions\node_modules\dialogflow-fulfillment\src\dialogflow-fulfillment.js
- \firebase\functions\index.js
- \AppData\Roaming\npm\node_modules\firebase-tools\lib\triggerParser.js

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

然后我们又回到了原点...

我该如何解决这个问题

先谢谢

firebase deployment command-line-interface
1个回答
0
投票

包中的.json

{ "name": "function", "description": "Firebase的云函数", "scripts": "service": { "service": "firebase emulators:start --only functions", "shell": { "service "firebase emulators:start --only functions", "shell": "firebase functions:shell", "start": "npm run shell", "deploy": "firebase deploy --only functions", "logs": "firebase functions:log" }, "engines": "node": "8" }, "dependencies": "firebase-admin": "^8.10.0", "firebase-functions": "^3.6.1", "dialogflow-fulfillment": "^0.4.1" }, "devDependencies": "firebase-functions-test", "^0.2.0": "^0.2.0" }, "private": true}。

© www.soinside.com 2019 - 2024. All rights reserved.