0

I'm trying to my deploy a small blog built with NextJS on Netlify but I'm getting this error while generating a build:

10:59:39 PM: [1/5] Validating package.json...
10:59:39 PM: error [email protected]: The engine "node" is incompatible with this module. Expected version "12.18.3". Got "12.18.0"
10:59:39 PM: error Found incompatible module.

My package.json has dependencies and engines specified like this:

 "dependencies": {
 "autoprefixer": "^10.0.4",
 "next": "^10.0.0",
 "postcss": "^8.1.10",
 "react": "16.13.1",
 "react-dom": "16.13.1",
 "tailwindcss": "^2.0.1"
 },
"engines": {
 "node": "12.18.3"
 }

However, if I change my node version in package.json to 12.18.0 it seems to generate the build on netlify successfully, but in that case my local dev server has trouble starting.

asked Dec 31, 2020 at 7:57

1 Answer 1

0

I solved this with yarn config set ignore-engines true and then delete node-modules and reinstall. But its a hack.

answered Jan 13, 2021 at 1:07
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.