问题
After upgrading to 8.4.0 with npm i -g firebase-tools
, the following is shown:
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
What should I do to resolve this?
回答1:
With the release of Firebase CLI 8.4.0, it appears a lot has changed, including a new local emulator UI. Among the changes are some modules that now require a minimum node version of 10. That's what the error messages are saying with:
Unsupported engine for module@version: wanted: {"node":">=10"}
If your local node version is less than 10, you will see these errors. It's time to upgrade your node version. If you're using nvm, that's as simple as typing nvm install 10
. This does not affect the version of node targeted by Cloud Functions at the time of deployment. The version of node for deployment is still declared in your package.json.
来源:https://stackoverflow.com/questions/61943139/update-of-firebase-cli-to-8-4-0-gives-errors-about-unsupported-engine-saying