[SOLVED] Yarn error regarding node version in firebase-nodejs tutorial

I’m following the tutorial but when i try to run “yarn run build” on the folder “functions” it gives an error: The engine “node” is incompatible with this module. Expected version “16”. Got “21.6.1”

using --ignore-engines doenst work.

I got the same error if i try to Deploy (firebase deploy)

And if i try to use the Node v16.16.0 i got an different error while trying to deploy and or starting the emulator:
Firebase CLI v13.0.3 is incompatible with Node.js v16.16.0 Please upgrade Node.js to version >=18.0.0 || >=20.0.0

I’ve managed to solve it. Firebase Cli v >= 13.0.0 dropped support for running firebase-tools on Node 16.

npm install -g [email protected]

1 Like