如何更改节点版本?“您请求的“节点”版本“8”与您的全球版本“10”不匹配

Pau*_*tos 3 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.
Run Code Online (Sandbox Code Playgroud)

Dou*_*son 8

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

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