Trying to use old node versions for firebase compatibility

Viewed 195

I'm trying to figure out how to use an old version of node so that I can try to learn about firebase functions.

Currently, I'm getting an error that says:

error functions@: The engine "node" is incompatible with this module. Expected version "8". Got "12.18.1"

I tried adding the following to my package.json:

"engines": {
    "node": "8x"
  }

When I try that change, restart and test node -v, I'm still on version 12.

Does anyone know how to configure a react app to use node in a way that is compatible with firebase functions?

2 Answers

Adding a property to engines will not reinstall Node.js. You need to reinstall it with the official installer, pinning the package version for Linux, or using a Node version manager like n or nvm.

Firebase Functions are compatible with node 10 AND UP.

Related