i functions: Preparing to emulate functions. Warning: You're using Node.js v8.10.0 but Google Cloud Functions only supports v6.11.5.
⚠ functions: Failed to load functions source code. Ensure that you have the latest SDK by running npm i --save firebase-functions inside the functions directory.
⚠ functions: Error from emulator. Error parsing triggers: Cannot find module '/home/developer/Development/host2/functions'
Try running "npm install" in your functions directory before deploying.
我们是 firebase 功能的新手,如何解决这个问题?
最佳答案
在许多情况下,新功能和错误修复仅适用于最新版本的 Firebase CLI 和 firebase-functions SDK。使用 Firebase 项目的函数文件夹中的这些命令经常更新 Firebase CLI 和 SDK 是一个好习惯:
npm install -g firebase-tools
npm install firebase-functions@latest firebase-admin@latest --save
访问:https://firebase.google.com/docs/functions/get-started
关于Firebase 功能问题?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50314155/