当我在终端 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/