将 Firebase CLI 更新到 8.4.0 会出现关于 "Unsupported engine" 说 '{"node":">=10"}' 的错误
Update of Firebase CLI to 8.4.0 gives errors about "Unsupported engine" saying '{"node":">=10"}'
使用npm i -g firebase-tools
升级到8.4.0后,显示如下:
npm WARN notsup Unsupported engine for google-auth-library@6.0.0: wanted: {"node":">=10"} (current: {"node":"8.16.2","npm":"6.14.5"})
npm WARN notsup Not compatible with your version of node/npm: google-auth-library@6.0.0
npm WARN notsup Unsupported engine for gaxios@3.0.3: wanted: {"node":">=10"} (current: {"node":"8.16.2","npm":"6.14.5"})
npm WARN notsup Not compatible with your version of node/npm: gaxios@3.0.3
npm WARN notsup Unsupported engine for gcp-metadata@4.1.0: wanted: {"node":">=10"} (current: {"node":"8.16.2","npm":"6.14.5"})
npm WARN notsup Not compatible with your version of node/npm: gcp-metadata@4.1.0
npm WARN notsup Unsupported engine for gtoken@5.0.1: wanted: {"node":">=10"} (current: {"node":"8.16.2","npm":"6.14.5"})
npm WARN notsup Not compatible with your version of node/npm: gtoken@5.0.1
npm WARN notsup Unsupported engine for google-p12-pem@3.0.1: wanted: {"node":">=10"} (current: {"node":"8.16.2","npm":"6.14.5"})
npm WARN notsup Not compatible with your version of node/npm: google-p12-pem@3.0.1
我应该怎么做才能解决这个问题?
随着 Firebase CLI 8.4.0, it appears a lot has changed, including a new local emulator UI 的发布。其中的变化是一些模块现在需要 10 的最低节点版本。这就是错误消息所说的:
Unsupported engine for module@version: wanted: {"node":">=10"}
如果您的本地节点版本低于 10,您将看到这些错误。是时候升级您的节点版本了。如果您使用的是 nvm,那就像键入 nvm install 10
一样简单。这不会影响部署时 Cloud Functions 所针对的节点版本。用于部署的节点版本仍然在您的 package.json.
中声明
使用npm i -g firebase-tools
升级到8.4.0后,显示如下:
npm WARN notsup Unsupported engine for google-auth-library@6.0.0: wanted: {"node":">=10"} (current: {"node":"8.16.2","npm":"6.14.5"})
npm WARN notsup Not compatible with your version of node/npm: google-auth-library@6.0.0
npm WARN notsup Unsupported engine for gaxios@3.0.3: wanted: {"node":">=10"} (current: {"node":"8.16.2","npm":"6.14.5"})
npm WARN notsup Not compatible with your version of node/npm: gaxios@3.0.3
npm WARN notsup Unsupported engine for gcp-metadata@4.1.0: wanted: {"node":">=10"} (current: {"node":"8.16.2","npm":"6.14.5"})
npm WARN notsup Not compatible with your version of node/npm: gcp-metadata@4.1.0
npm WARN notsup Unsupported engine for gtoken@5.0.1: wanted: {"node":">=10"} (current: {"node":"8.16.2","npm":"6.14.5"})
npm WARN notsup Not compatible with your version of node/npm: gtoken@5.0.1
npm WARN notsup Unsupported engine for google-p12-pem@3.0.1: wanted: {"node":">=10"} (current: {"node":"8.16.2","npm":"6.14.5"})
npm WARN notsup Not compatible with your version of node/npm: google-p12-pem@3.0.1
我应该怎么做才能解决这个问题?
随着 Firebase CLI 8.4.0, it appears a lot has changed, including a new local emulator UI 的发布。其中的变化是一些模块现在需要 10 的最低节点版本。这就是错误消息所说的:
Unsupported engine for module@version: wanted: {"node":">=10"}
如果您的本地节点版本低于 10,您将看到这些错误。是时候升级您的节点版本了。如果您使用的是 nvm,那就像键入 nvm install 10
一样简单。这不会影响部署时 Cloud Functions 所针对的节点版本。用于部署的节点版本仍然在您的 package.json.