Unsupported engine, Npm and node versions problem

When I ran the npm install command in the “Side quest: Intermediate Schema Design” course, I encountered some errors regarding the Npm and node versions separately on the client and server side. Both support different versions.

What should I do to get rid of these problems?

When I got the following error on the server side, I changed the node and npm versions. This time, I got the following error on the client side.

Server Side Errors

npm ERR! code EBADENGINE
npm ERR! engine Unsupported engine
npm ERR! engine Not compatible with your version of node/npm: @jest/expect-utils@29.3.1
npm ERR! notsup Not compatible with your version of node/npm: @jest/expect-utils@29.3.1
npm ERR! notsup Required: {“node”:“^14.15.0 || ^16.10.0 || >=18.0.0”}
npm ERR! notsup Actual: {“npm”:“8.5.5”,“node”:“v17.8.0”}
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\ahmet\AppData\Local\npm-cache_logs\2023-02-20T13_01_27_052Z-debug-0.log

Client Side Errors

npm ERR! code EBADENGINE
npm ERR! engine Unsupported engine
npm ERR! engine Not compatible with your version of node/npm: @jest/expect-utils@29.3.1
npm ERR! notsup Not compatible with your version of node/npm: @jest/expect-utils@29.3.1
npm ERR! notsup Required: {“node”:“^14.15.0 || ^16.10.0 || >=18.0.0”}
npm ERR! notsup Actual: {“npm”:“8.5.5”,“node”:“v17.8.0”}
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\username\AppData\Local\npm-cache_logs\2023-02-20T13_01_27_052Z-debug-0.log

Hi @learnapollo !

For that project, both client and server folders are restricted to using node v14 - v18. Can you confirm you switched to a compatible version in both terminals where you ran the npm install command? What version are you using?

1 Like

Hi @MichelleMabuyo,

I was using the latest versions before I got the error on the server side. I then installed the following versions and the server side bugs were fixed. But the client side problem persists.

Is the best way to fix this issue to install the appropriate npm and node versions globally within both projects?

Hey @learnapollo, v17 (and all odd versions of node) generally have much shorter windows of support and will never be considered the “active” version, being superseded by their even version counterpart (in this case v18). I recommend upgrading your node version to v18 and using even versions of node in general.

The errors you’re seeing are helpful in this case. You’re using a package (@jest/expect-utils) which requires a specific version of node in order to work. You can see the required version in the error message (^14.15.0 || ^16.10.0 || >=18.0.0) which intentionally excludes v17.

1 Like

Hey @trevor.scheer
I understood.
Thank you for the answer.