Member-only story

How to fix “Unsupported engine” error when running NPM for NodeJS

Bryant Jimin Son
2 min readMay 12, 2024

--

So, here is a nasty error. I got the following error while running npm installthrough NPM:

npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE package: 'react-mongodb-app@1.0.0',
npm WARN EBADENGINE required: { node: '14.x', npm: '6.x' },
npm WARN EBADENGINE current: { node: 'v21.7.3', npm: '10.5.0' }
npm WARN EBADENGINE }

Or, it looks like the following.

Nasty NPM error

Oh, well. I generated those NodeJS stuffs through GitHub Copilot, and it was “surprisingly” failing at that first time. I knew the answer has to be with that package defined in package.json . But the question is how to fix it?

I decided to ask the question to “GitHub Copilot Chat” so whether I can fix the issue. So, here is the result.

GitHub Copilot generating the answer

So, the GitHub Copilot Chat was pointing out that I should fix my NPM/Node version. I took a close look at the package.json

Problem with the engines and specifications

--

--

Bryant Jimin Son
Bryant Jimin Son

Written by Bryant Jimin Son

A cloud practitioner talking about technology, travels & career tips. But I will sometimes cover financial advises and some random stuffs.

Responses (1)