I’m having the following issue deploying Next.JS to netlify.
Please find below error log and package.json:
{
"name": "ng",
"version": "0.1.0",
"private": true,
"scripts": {
"dev": "next dev",
"build": "next build",
"start": "next start",
"lint": "next lint"
},
"dependencies": {
"autoprefixer": "^10.4.4",
"next": "12.1.5",
"postcss": "^8.4.12",
"react": "18.0.0",
"react-dom": "18.0.0",
"tailwindcss": "^3.0.24",
"uuid": "^8.3.2"
},
"devDependencies": {
"@types/node": "17.0.25",
"@types/react": "18.0.5",
"@types/react-dom": "18.0.1",
"@types/uuid": "^8.3.4",
"eslint": "^8.13.0",
"eslint-config-next": "12.1.5",
"typescript": "4.6.3"
}
}
12:20:48 AM: Build ready to start
12:20:50 AM: build-image version: ac716c5be7f79fe384a0f3759e8ef612cb821a37 (xenial)
12:20:50 AM: build-image tag: v3.13.0
12:20:50 AM: buildbot version: e552b142336b2b1222a93a4fd4cbed0019c77b46
12:20:51 AM: Fetching cached dependencies
12:20:51 AM: Failed to fetch cache, continuing with build
12:20:51 AM: Starting to prepare the repo for build
12:20:51 AM: No cached dependencies found. Cloning fresh repo
12:20:51 AM: git clone https://github.com/lcskoerner/ng
12:20:53 AM: Preparing Git Reference refs/heads/main
12:20:53 AM: Parsing package.json dependencies
12:20:55 AM: Starting build script
12:20:55 AM: Installing dependencies
12:20:55 AM: Python version set to 2.7
12:20:56 AM: v12.18.0 is already installed.
12:20:57 AM: Now using node v12.18.0 (npm v6.14.4)
12:20:57 AM: Started restoring cached build plugins
12:20:57 AM: Finished restoring cached build plugins
12:20:57 AM: Attempting ruby version 2.7.2, read from environment
12:20:58 AM: Using ruby version 2.7.2
12:20:59 AM: Using PHP version 5.6
12:20:59 AM: Started restoring cached yarn cache
12:20:59 AM: Finished restoring cached yarn cache
12:20:59 AM: No yarn workspaces detected
12:20:59 AM: Started restoring cached node modules
12:20:59 AM: Finished restoring cached node modules
12:21:00 AM: Installing NPM modules using Yarn version 1.22.10
12:21:00 AM: yarn install v1.22.10
12:21:00 AM: [1/4] Resolving packages...
12:21:00 AM: [2/4] Fetching packages...
12:21:14 AM: error next@12.1.5: The engine "node" is incompatible with this module. Expected version ">=12.22.0". Got "12.18.0"
12:21:14 AM: error Found incompatible module.
12:21:14 AM: info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
12:21:14 AM: Error during Yarn install
12:21:14 AM: Build was terminated: Build script returned non-zero exit code: 1
12:21:15 AM: Creating deploy upload records
12:21:15 AM: Failing build: Failed to build site
12:21:15 AM: Failed during stage 'building site': Build script returned non-zero exit code: 1 (https://ntl.fyi/exit-code-1)
12:21:15 AM: Finished processing build request in 24.502983593s
Any help is appreciated. How can I upgrade the node “engine”?