Hello, i am encountering a problem while trying to deploy my next.js app from this tutorial (https://www.youtube.com/watch?v=4mOkFXyxfsU). I think the problem might be that I have the wrong dependency’s installed but I don’t know how to fix it…
This is the deploy log:
11:25:50 AM: Build ready to start
11:25:52 AM: build-image version: d7b3dbfb0846505993c9a131894d1858074c90b4 (focal)
11:25:52 AM: build-image tag: v4.10.1
11:25:52 AM: buildbot version: 1c362ef848ac5e35535bdb572ebca893db28c8a0
11:25:52 AM: Fetching cached dependencies
11:25:52 AM: Failed to fetch cache, continuing with build
11:25:52 AM: Starting to prepare the repo for build
11:25:52 AM: No cached dependencies found. Cloning fresh repo
11:25:52 AM: git clone https://github.com/Thibaut738/RCD
11:25:57 AM: Preparing Git Reference refs/heads/main
11:25:57 AM: Parsing package.json dependencies
11:25:58 AM: Starting build script
11:25:58 AM: Installing dependencies
11:25:58 AM: Python version set to 2.7
11:25:59 AM: Downloading and installing node v16.17.1…
11:25:59 AM: Downloading https://nodejs.org/dist/v16.17.1/node-v16.17.1-linux-x64.tar.xz…
11:25:59 AM: Computing checksum with sha256sum
11:25:59 AM: Checksums matched!
11:26:01 AM: Now using node v16.17.1 (npm v8.15.0)
11:26:01 AM: Started restoring cached build plugins
11:26:01 AM: Finished restoring cached build plugins
11:26:01 AM: Attempting ruby version 2.7.2, read from environment
11:26:02 AM: Using ruby version 2.7.2
11:26:02 AM: Using PHP version 8.0
11:26:02 AM: No npm workspaces detected
11:26:02 AM: Started restoring cached node modules
11:26:02 AM: Finished restoring cached node modules
11:26:02 AM: Installing NPM modules using NPM version 8.15.0
11:26:02 AM: npm WARN config tmp This setting is no longer used. npm stores temporary files in a special
11:26:02 AM: npm WARN config location in the cache, and they are managed by
11:26:02 AM: npm WARN config cacache
.
11:26:03 AM: npm WARN config tmp This setting is no longer used. npm stores temporary files in a special
11:26:03 AM: npm WARN config location in the cache, and they are managed by
11:26:03 AM: npm WARN config cacache
.
11:26:03 AM: npm ERR! code ERESOLVE
11:26:03 AM: npm ERR! ERESOLVE could not resolve
11:26:03 AM: npm ERR!
11:26:03 AM: npm ERR! While resolving: next-sanity-image@3.2.1
11:26:03 AM: npm ERR! Found: @sanity/client@3.4.1
11:26:03 AM: npm ERR! node_modules/@sanity/client
11:26:03 AM: npm ERR! @sanity/client@“^3.2.0” from the root project
11:26:03 AM: npm ERR!
11:26:03 AM: npm ERR! Could not resolve dependency:
11:26:03 AM: npm ERR! peer @sanity/client@“^2.11.0” from next-sanity-image@3.2.1
11:26:03 AM: npm ERR! node_modules/next-sanity-image
11:26:03 AM: npm ERR! next-sanity-image@“^3.2.1” from the root project
11:26:03 AM: npm ERR!
11:26:03 AM: npm ERR! Conflicting peer dependency: @sanity/client@2.23.2
11:26:03 AM: npm ERR! node_modules/@sanity/client
11:26:03 AM: npm ERR! peer @sanity/client@“^2.11.0” from next-sanity-image@3.2.1
11:26:03 AM: npm ERR! node_modules/next-sanity-image
11:26:03 AM: npm ERR! next-sanity-image@“^3.2.1” from the root project
11:26:03 AM: npm ERR!
11:26:03 AM: npm ERR! Fix the upstream dependency conflict, or retry
11:26:03 AM: npm ERR! this command with --force, or --legacy-peer-deps
11:26:03 AM: npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
11:26:03 AM: npm ERR!
11:26:03 AM: npm ERR! See /opt/buildhome/.npm/eresolve-report.txt for a full report.
11:26:03 AM: npm ERR! A complete log of this run can be found in:
11:26:03 AM: npm ERR! /opt/buildhome/.npm/_logs/2022-09-26T09_26_03_073Z-debug-0.log
11:26:03 AM: Error during NPM install
11:26:03 AM: Build was terminated: Build script returned non-zero exit code: 1
11:26:03 AM: Creating deploy upload records
11:26:04 AM: Failing build: Failed to build site
11:26:04 AM: Failed during stage ‘building site’: Build script returned non-zero exit code: 1 (Search results for '"non-zero exit code: 1"' - Netlify Support Forums)
11:26:04 AM: Finished processing build request in 11.871868119s
THIS IS THE