[Chartjs]-The engine “node” is incompatible with this module when installing React-chartjs-2 Chart.js,

0👍

You need to upgrade your node version. As you are using husky v4, you need node >= 10.

Check husky installation guide and The engine “node” is incompatible with this module.

2👍

From the log, I can see that this is an issue with the version of the node you are currently having. See this line in your log

The engine "node" is incompatible with the module. Expected version ">=10". Got "8.10.0"

To solve this, you could try this

 1. Install nvm
 2. Download another version of node ">=10"
 3. Switch to that the latest version
 4. And try installing the module again

0👍

For anyone on Husky v7, and using VSCode:

VSCode can use a different shell to your standard one. In my case, it was using bash instead of zsh – which did not have nvm installed and therefore was not using the correct version of node.

Fix:

  1. Open the Command Palette in VSCode – + + P
  2. Type Terminal: Select Default Profile
  3. Select the terminal that you have set up nvm or similar on.
  4. Restart VSCode
  5. 🎉

Leave a comment