node.js - 如何更改 Node 版本? "Your requested " Node ”版本 "8"与您的全局版本 "10"不匹配

标签 node.js firebase firebase-cli

当我在终端 firebase 模拟器中运行时会发生这种情况:start

波纹管所有输出

i  emulators: Starting emulators: functions, hosting
✔  hub: emulator hub started at ht tp://localhost:4400
⚠  Your requested "node" version "8" doesn't match your global version "10"
✔  functions: functions emulator started at ht tp://localhost:5001
i  hosting: Serving hosting files from: dist/spa-mat
✔  hosting: Local server: ht tp://localhost:5000
✔  hosting: hosting emulator started at http://localhost:5000
i  functions: Watching "/var/w ww/html/teachers/agnos2108-app.teachersnow-6391de281bf3/functions" for Cloud Functions...
✔  functions[sendEmailLogger]: http function initialized (ht tp://localhost:5001/teachernow-7082b/us-central1/sendEmailLogger).
✔  functions[sendMail]: http function initialized (ht tp://localhost:5001/teachernow-7082b/us-central1/sendMail).
✔  functions[payClbBNKTN2019ID]: http function initialized (ht tp://localhost:5001/teachernow-7082b/us-central1/payClbBNKTN2019ID).
✔  functions[payClbBNKTN2019]: http function initialized (ht tp://localhost:5001/teachernow-7082b/us-central1/payClbBNKTN2019).
✔  functions[payClbCCTN2019]: http function initialized (ht tp://localhost:5001/teachernow-7082b/us-central1/payClbCCTN2019).
✔  functions[payClbCDTN2019]: http function initialized (ht tp://localhost:5001/teachernow-7082b/us-central1/payClbCDTN2019).
i  functions[SchedulesOn]: function ignored because the database emulator does not exist or is not running.
i  functions[UsersOn]: function ignored because the database emulator does not exist or is not running.
i  functions[BankslipOn]: function ignored because the database emulator does not exist or is not running.
i  functions[sendWelcomeEmail]: function ignored because the auth emulator does not exist or is not running.
✔  emulators: All emulators started, it is now safe to connect.

最佳答案

该消息并未指示错误。它只是让您知道您的 package.json 声明目标 Node 版本为 8,但您在机器上使用 Node 10 进行仿真。这不太可能是问题。

如果您想摆脱该消息,您应该在您的机器上安装 Node 8 而不是 Node 10 并使用它。

关于node.js - 如何更改 Node 版本? "Your requested " Node ”版本 "8"与您的全局版本 "10"不匹配,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61489347/

相关文章:

node.js - 如何允许 Google App Engine 访问 Google Cloud PostgreSQL

javascript - 是否可以在函数内导出模块?

node.js - 将文件上传数据转发到另一个 API,就像 Node 和 express 一样

ios - 使用 Firebase 显示用户名

swift - 仅在创建构建时使用未解析的标识符 'FirebaseApp'

Firebase CLI : the following filters were specified but do not match any functions in the project

firebase - 如何以非交互方式安装 firebase 扩展

javascript - 使用 nodemailer 发送邮件

ios - 适用于 Android 的 Firebase 推送通知,但仅适用于 iOS 的 Firebase 控制台

Firebase 托管公用文件夹别名