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.

Hi @trevor.scheer et al,
while defining the scheme , needed a few packages first: @apollo/server , graphql and graphql-tag
i get the following error while installing from the tyerminal:
C:\Users\kvittala\Documents\graphql_repo_copy\odyssey-lift-off-part1\server\src>npm install @apollo/server graphql graphql-tag
npm error Maximum call stack size exceeded
npm error A complete log of this run can be found in: C:\Users\kvittala\AppData\Local\npm-cache_logs\2024-06-23T22_17_38_578Z-debug-0.log

What is missing or what am i doing wrong?

current version of node installed
C:\Users\kvittala\Documents\graphql_repo_copy\odyssey-lift-off-part1\server\src>node -v
v20.5.1

Hey there @Krishna_Bhargav - I’m not able to reproduce but you can try some of the answers in this post: javascript - Maximum call stack size exceeded on npm install - Stack Overflow