Site name: https://enchanting-fudge-99b59b.netlify.app
custom domain: wyzr.in
Iβm trying to deploy our site in preview mode, but I get the following error during the build time:
7:01:34 PM: build-image version: 1ca34a93198b041e44214013884c57d146a23fed (focal)
7:01:34 PM: build-image tag: v4.16.4
7:01:34 PM: buildbot version: 5d70ebdb976733297fb4c90b41002389a248e2df
7:01:34 PM: Fetching cached dependencies
7:01:34 PM: Starting to download cache of 499.6MB
7:01:38 PM: Finished downloading cache in 3.991s
7:01:38 PM: Starting to extract cache
7:01:44 PM: Finished extracting cache in 6.194s
7:01:44 PM: Finished fetching cache in 10.267s
7:01:44 PM: Starting to prepare the repo for build
7:01:44 PM: Preparing Git Reference pull/21/head
7:01:46 PM: Parsing package.json dependencies
7:01:47 PM: Different publish path detected, going to use the one specified in the Netlify configuration file: 'next-main/out' versus '' in the Netlify UI
7:01:47 PM: Starting build script
7:01:47 PM: Installing dependencies
7:01:47 PM: Python version set to 2.7
7:01:47 PM: Started restoring cached Node.js version
7:01:48 PM: Finished restoring cached Node.js version
7:01:48 PM: v16.19.0 is already installed.
7:01:48 PM: Now using node v16.19.0 (npm v8.19.3)
7:01:48 PM: Enabling Node.js Corepack
7:01:48 PM: Started restoring cached build plugins
7:01:48 PM: Finished restoring cached build plugins
7:01:48 PM: Attempting Ruby version 2.7.2, read from environment
7:01:49 PM: Using Ruby version 2.7.2
7:01:49 PM: Using PHP version 8.0
7:01:49 PM: Started restoring cached corepack dependencies
7:01:49 PM: mv: cannot move '/opt/build/cache/.node/corepack' to '/opt/buildhome/.node/corepack': No such file or directory
7:01:49 PM: Finished restoring cached corepack dependencies
7:01:49 PM: Started restoring cached yarn cache
7:01:51 PM: Finished restoring cached yarn cache
7:01:51 PM: Installing Yarn version 1.22.10
7:01:51 PM: Preparing yarn@1.22.10 for immediate activation...
7:01:51 PM: No yarn workspaces detected
7:01:51 PM: Started restoring cached node modules
7:01:51 PM: Finished restoring cached node modules
7:01:51 PM: Installing npm packages using Yarn version 1.22.10
7:01:52 PM: yarn install v1.22.10
7:01:52 PM: warning package-lock.json found. Your project contains lock files generated by tools other than Yarn. It is advised not to mix package managers in order to avoid resolution inconsistencies caused by unsynchronized lock files. To clear this warning, remove package-lock.json.
7:01:52 PM: [1/4] Resolving packages...
7:01:54 PM: [2/4] Fetching packages...
7:01:57 PM: info fsevents@2.3.2: The platform "linux" is incompatible with this module.
7:01:57 PM: info "fsevents@2.3.2" is an optional dependency and failed compatibility check. Excluding it from installation.
7:01:57 PM: info @netlify/esbuild-darwin-arm64@0.14.39: The platform "linux" is incompatible with this module.
7:01:57 PM: info "@netlify/esbuild-darwin-arm64@0.14.39" is an optional dependency and failed compatibility check. Excluding it from installation.
7:01:57 PM: info @netlify/esbuild-darwin-arm64@0.14.39: The CPU architecture "x64" is incompatible with this module.
7:01:57 PM: info @netlify/esbuild-darwin-64@0.14.39: The platform "linux" is incompatible with this module.
7:01:57 PM: info "@netlify/esbuild-darwin-64@0.14.39" is an optional dependency and failed compatibility check. Excluding it from installation.
7:01:57 PM: info @netlify/esbuild-android-arm64@0.14.39: The platform "linux" is incompatible with this module.
7:01:57 PM: info "@netlify/esbuild-android-arm64@0.14.39" is an optional dependency and failed compatibility check. Excluding it from installation.
7:01:57 PM: info @netlify/esbuild-android-arm64@0.14.39: The CPU architecture "x64" is incompatible with this module.
7:01:57 PM: info @netlify/esbuild-freebsd-64@0.14.39: The platform "linux" is incompatible with this module.
7:01:57 PM: info "@netlify/esbuild-freebsd-64@0.14.39" is an optional dependency and failed compatibility check. Excluding it from installation.
7:01:57 PM: info @netlify/esbuild-freebsd-arm64@0.14.39: The platform "linux" is incompatible with this module.
7:01:57 PM: info "@netlify/esbuild-freebsd-arm64@0.14.39" is an optional dependency and failed compatibility check. Excluding it from installation.
7:01:57 PM: info @netlify/esbuild-freebsd-arm64@0.14.39: The CPU architecture "x64" is incompatible with this module.
7:01:57 PM: info @netlify/esbuild-linux-32@0.14.39: The CPU architecture "x64" is incompatible with this module.
7:01:57 PM: info "@netlify/esbuild-linux-32@0.14.39" is an optional dependency and failed compatibility check. Excluding it from installation.
7:01:57 PM: info @netlify/esbuild-linux-mips64le@0.14.39: The CPU architecture "x64" is incompatible with this module.
7:01:57 PM: info "@netlify/esbuild-linux-mips64le@0.14.39" is an optional dependency and failed compatibility check. Excluding it from installation.
7:01:57 PM: info @netlify/esbuild-linux-arm64@0.14.39: The CPU architecture "x64" is incompatible with this module.
7:01:57 PM: info "@netlify/esbuild-linux-arm64@0.14.39" is an optional dependency and failed compatibility check. Excluding it from installation.
7:01:57 PM: info @netlify/esbuild-linux-arm@0.14.39: The CPU architecture "x64" is incompatible with this module.
7:01:57 PM: info "@netlify/esbuild-linux-arm@0.14.39" is an optional dependency and failed compatibility check. Excluding it from installation.
7:01:57 PM: info @netlify/esbuild-linux-ppc64le@0.14.39: The CPU architecture "x64" is incompatible with this module.
7:01:57 PM: info "@netlify/esbuild-linux-ppc64le@0.14.39" is an optional dependency and failed compatibility check. Excluding it from installation.
7:01:57 PM: info @netlify/esbuild-linux-s390x@0.14.39: The CPU architecture "x64" is incompatible with this module.
7:01:57 PM: info "@netlify/esbuild-linux-s390x@0.14.39" is an optional dependency and failed compatibility check. Excluding it from installation.
7:01:57 PM: info @netlify/esbuild-linux-riscv64@0.14.39: The CPU architecture "x64" is incompatible with this module.
7:01:57 PM: info "@netlify/esbuild-linux-riscv64@0.14.39" is an optional dependency and failed compatibility check. Excluding it from installation.
7:01:57 PM: info @netlify/esbuild-windows-64@0.14.39: The platform "linux" is incompatible with this module.
7:01:57 PM: info "@netlify/esbuild-windows-64@0.14.39" is an optional dependency and failed compatibility check. Excluding it from installation.
7:01:57 PM: info @netlify/esbuild-netbsd-64@0.14.39: The platform "linux" is incompatible with this module.
7:01:57 PM: info "@netlify/esbuild-netbsd-64@0.14.39" is an optional dependency and failed compatibility check. Excluding it from installation.
7:01:57 PM: info @netlify/esbuild-openbsd-64@0.14.39: The platform "linux" is incompatible with this module.
7:01:57 PM: info "@netlify/esbuild-openbsd-64@0.14.39" is an optional dependency and failed compatibility check. Excluding it from installation.
7:01:57 PM: info @netlify/esbuild-windows-arm64@0.14.39: The platform "linux" is incompatible with this module.
7:01:57 PM: info "@netlify/esbuild-windows-arm64@0.14.39" is an optional dependency and failed compatibility check. Excluding it from installation.
7:01:57 PM: info @netlify/esbuild-windows-arm64@0.14.39: The CPU architecture "x64" is incompatible with this module.
7:01:57 PM: info @netlify/esbuild-sunos-64@0.14.39: The platform "linux" is incompatible with this module.
7:01:57 PM: info "@netlify/esbuild-sunos-64@0.14.39" is an optional dependency and failed compatibility check. Excluding it from installation.
7:01:57 PM: info @netlify/esbuild-android-64@0.14.39: The platform "linux" is incompatible with this module.
7:01:57 PM: info "@netlify/esbuild-android-64@0.14.39" is an optional dependency and failed compatibility check. Excluding it from installation.
7:01:57 PM: info @netlify/esbuild-windows-32@0.14.39: The platform "linux" is incompatible with this module.
7:01:57 PM: info "@netlify/esbuild-windows-32@0.14.39" is an optional dependency and failed compatibility check. Excluding it from installation.
7:01:57 PM: info @netlify/esbuild-windows-32@0.14.39: The CPU architecture "x64" is incompatible with this module.
7:01:57 PM: info @next/swc-darwin-x64@11.1.2: The platform "linux" is incompatible with this module.
7:01:57 PM: info "@next/swc-darwin-x64@11.1.2" is an optional dependency and failed compatibility check. Excluding it from installation.
7:01:57 PM: info @next/swc-win32-x64-msvc@11.1.2: The platform "linux" is incompatible with this module.
7:01:57 PM: info "@next/swc-win32-x64-msvc@11.1.2" is an optional dependency and failed compatibility check. Excluding it from installation.
7:01:57 PM: info @next/swc-darwin-arm64@11.1.2: The platform "linux" is incompatible with this module.
7:01:57 PM: info "@next/swc-darwin-arm64@11.1.2" is an optional dependency and failed compatibility check. Excluding it from installation.
7:01:57 PM: info @next/swc-darwin-arm64@11.1.2: The CPU architecture "x64" is incompatible with this module.
7:01:57 PM: [3/4] Linking dependencies...
7:01:57 PM: warning " > @chakra-ui/icons@1.0.13" has unmet peer dependency "@chakra-ui/system@>=1.0.0".
7:01:57 PM: warning "@chakra-ui/icons > @chakra-ui/icon@1.1.9" has unmet peer dependency "@chakra-ui/system@>=1.0.0".
7:01:57 PM: warning "@chakra-ui/react > @chakra-ui/modal > react-remove-scroll@2.4.1" has incorrect peer dependency "react@^16.8.0 || ^17.0.0".
7:01:57 PM: warning "@chakra-ui/react > @chakra-ui/toast > @reach/alert@0.13.2" has incorrect peer dependency "react@^16.8.0 || 17.x".
7:01:57 PM: warning "@chakra-ui/react > @chakra-ui/toast > @reach/alert@0.13.2" has incorrect peer dependency "react-dom@^16.8.0 || 17.x".
7:01:57 PM: warning "@chakra-ui/react > @chakra-ui/modal > @chakra-ui/focus-lock > react-focus-lock@2.5.0" has incorrect peer dependency "react@^16.8.0 || ^17.0.0".
7:01:57 PM: warning "@chakra-ui/react > @chakra-ui/modal > react-remove-scroll > react-remove-scroll-bar@2.2.0" has incorrect peer dependency "react@^16.8.0 || ^17.0.0".
7:01:57 PM: warning "@chakra-ui/react > @chakra-ui/modal > react-remove-scroll > react-style-singleton@2.1.1" has incorrect peer dependency "react@^16.8.0 || ^17.0.0".
7:01:57 PM: warning "@chakra-ui/react > @chakra-ui/modal > react-remove-scroll > use-callback-ref@1.2.5" has incorrect peer dependency "react@^16.8.0 || ^17.0.0".
7:01:57 PM: warning "@chakra-ui/react > @chakra-ui/modal > react-remove-scroll > use-sidecar@1.0.5" has incorrect peer dependency "react@^16.8.0 || ^17.0.0".
7:01:57 PM: warning "@chakra-ui/react > @chakra-ui/toast > @reach/alert > @reach/utils@0.13.2" has incorrect peer dependency "react@^16.8.0 || 17.x".
7:01:57 PM: warning "@chakra-ui/react > @chakra-ui/toast > @reach/alert > @reach/utils@0.13.2" has incorrect peer dependency "react-dom@^16.8.0 || 17.x".
7:01:57 PM: warning "@chakra-ui/react > @chakra-ui/toast > @reach/alert > @reach/visually-hidden@0.13.2" has incorrect peer dependency "react@^16.8.0 || 17.x".
7:01:57 PM: warning "@chakra-ui/react > @chakra-ui/toast > @reach/alert > @reach/visually-hidden@0.13.2" has incorrect peer dependency "react-dom@^16.8.0 || 17.x".
7:01:57 PM: warning "@chakra-ui/react > @chakra-ui/modal > @chakra-ui/focus-lock > react-focus-lock > react-clientside-effect@1.2.5" has incorrect peer dependency "react@^15.3.0 || ^16.0.0 || ^17.0.0".
7:01:57 PM: warning "@emotion/styled > @emotion/babel-plugin@11.3.0" has unmet peer dependency "@babel/core@^7.0.0".
7:01:57 PM: warning "@emotion/styled > @emotion/babel-plugin > @babel/plugin-syntax-jsx@7.14.5" has unmet peer dependency "@babel/core@^7.0.0-0".
7:01:57 PM: warning " > @microsoft/applicationinsights-react-js@3.1.5" has incorrect peer dependency "react@^17.0.1".
7:01:57 PM: warning " > next@11.1.2" has incorrect peer dependency "react@^17.0.2".
7:01:57 PM: warning " > next@11.1.2" has incorrect peer dependency "react-dom@^17.0.2".
7:01:57 PM: warning "next > @next/react-dev-overlay@11.1.2" has incorrect peer dependency "react@^17.0.2".
7:01:57 PM: warning "next > @next/react-dev-overlay@11.1.2" has incorrect peer dependency "react-dom@^17.0.2".
7:01:57 PM: warning "next > use-subscription@1.5.1" has incorrect peer dependency "react@^16.8.0 || ^17.0.0".
7:01:57 PM: warning " > next-auth@4.19.1" has incorrect peer dependency "next@^12.2.5 || ^13".
7:01:57 PM: warning " > file-loader@6.2.0" has unmet peer dependency "webpack@^4.0.0 || ^5.0.0".
7:01:59 PM: [4/4] Building fresh packages...
7:02:00 PM: success Saved lockfile.
7:02:00 PM: Done in 8.75s.
7:02:00 PM: npm packages installed using Yarn
7:02:00 PM: Started restoring cached go cache
7:02:00 PM: Finished restoring cached go cache
7:02:00 PM: Installing Go version 1.16.5 (requested 1.16.5)
7:02:04 PM: unset GOOS;
7:02:04 PM: unset GOARCH;
7:02:04 PM: export GOROOT='/opt/buildhome/.gimme/versions/go1.16.5.linux.amd64';
7:02:04 PM: export PATH="/opt/buildhome/.gimme/versions/go1.16.5.linux.amd64/bin:${PATH}";
7:02:04 PM: go version >&2;
7:02:04 PM: export GIMME_ENV="/opt/buildhome/.gimme/env/go1.16.5.linux.amd64.env"
7:02:04 PM: go version go1.16.5 linux/amd64
7:02:05 PM: Detected 1 framework(s)
7:02:05 PM: "next" at version "11.1.2"
7:02:05 PM: Installing missing commands
7:02:05 PM: Verify run directory
7:02:05 PM: Section completed: initializing
7:02:06 PM: β
7:02:06 PM: Netlify Build
7:02:06 PM: ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
7:02:06 PM: β
7:02:06 PM: β― Version
7:02:06 PM: @netlify/build 29.5.1
7:02:06 PM: β
7:02:06 PM: β― Flags
7:02:06 PM: baseRelDir: true
7:02:06 PM: buildId: 63d9183456447e0008be73dc
7:02:06 PM: deployId: 63d9183456447e0008be73de
7:02:06 PM: β
7:02:06 PM: β― Current directory
7:02:06 PM: /opt/build/repo/next-main
7:02:06 PM: β
7:02:06 PM: β― Config file
7:02:06 PM: /opt/build/repo/next-main/netlify.toml
7:02:06 PM: β
7:02:06 PM: β― Context
7:02:06 PM: deploy-preview
7:02:06 PM: β
7:02:06 PM: β― Using Next.js Runtime - v4.30.3
7:02:08 PM: β
7:02:08 PM: 1. @netlify/plugin-nextjs (onPreBuild event)
7:02:08 PM: ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
7:02:08 PM: β
7:02:08 PM: No Next.js cache to restore.
7:02:08 PM: Netlify configuration property "build.environment.NEXT_PRIVATE_TARGET" value changed.
7:02:08 PM: β
7:02:08 PM: (@netlify/plugin-nextjs onPreBuild completed in 18ms)
7:02:08 PM: β
7:02:08 PM: 2. build.command from netlify.toml
7:02:08 PM: ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
7:02:08 PM: β
7:02:08 PM: $ yarn build
7:02:08 PM: yarn run v1.22.10
7:02:08 PM: $ next build
7:02:08 PM: info - Using webpack 5. Reason: Enabled by default https://nextjs.org/docs/messages/webpack5
7:02:08 PM: warn - No build cache found. Please configure build caching for faster rebuilds. Read more: https://nextjs.org/docs/messages/no-cache
7:02:08 PM: Browserslist: caniuse-lite is outdated. Please run:
7:02:08 PM: npx browserslist@latest --update-db
7:02:08 PM: Why you should do it regularly:
7:02:08 PM: https://github.com/browserslist/browserslist#browsers-data-updating
7:02:08 PM: info - Checking validity of types...
7:02:15 PM: Failed to compile.
7:02:15 PM:
7:02:15 PM: ./node_modules/next-auth/next/index.d.ts:18:61
7:02:15 PM: Type error: '>' expected.
7:02:15 PM: 16 | export declare function unstable_getServerSession<O extends GetServerSessionOptions, R = O["callbacks"] extends {
7:02:15 PM: 17 | session: (...args: any[]) => infer U;
7:02:15 PM: > 18 | } ? U : Session>(...args: Parameters<typeof getServerSession<O, R>>): ReturnType<typeof getServerSession<O, R>>;
7:02:15 PM: | ^
7:02:15 PM: 19 | declare global {
7:02:15 PM: 20 | namespace NodeJS {
7:02:15 PM: 21 | interface ProcessEnv {
7:02:16 PM: error Command failed with exit code 1. (https://ntl.fyi/exit-code-1)
7:02:16 PM: info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
7:02:16 PM: β
7:02:16 PM: "build.command" failed
7:02:16 PM: ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
7:02:16 PM: β
7:02:16 PM: Error message
7:02:16 PM: Command failed with exit code 1: yarn build (https://ntl.fyi/exit-code-1)
7:02:16 PM: β
7:02:16 PM: Error location
7:02:16 PM: In build.command from netlify.toml:
7:02:16 PM: yarn build
7:02:16 PM: β
7:02:16 PM: Resolved config
7:02:16 PM: build:
7:02:16 PM: base: /opt/build/repo/next-main
7:02:16 PM: command: yarn build
7:02:16 PM: commandOrigin: config
7:02:16 PM: environment:
7:02:16 PM: - NETLIFY_GRAPH_TOKEN
7:02:16 PM: - NEXT_PUBLIC_DOMAIN_URL
7:02:16 PM: - NEXT_PUBLIC_MAIN_WEBSITE
7:02:16 PM: - NEXT_PUBLIC_RAZORPAY_KEY
7:02:16 PM: - ONEGRAPH_AUTHLIFY_TOKEN
7:02:16 PM: - REVIEW_ID
7:02:16 PM: - NEXT_PRIVATE_TARGET
7:02:16 PM: publish: /opt/build/repo/next-main/out
7:02:16 PM: publishOrigin: config
7:02:16 PM: plugins:
7:02:16 PM: - inputs: {}
7:02:16 PM: origin: config
7:02:16 PM: package: '@netlify/plugin-nextjs'
7:02:16 PM: Caching artifacts
7:02:16 PM: Started saving node modules
7:02:18 PM: Failed during stage 'building site': Build script returned non-zero exit code: 2 (https://ntl.fyi/exit-code-2)
7:02:16 PM: Finished saving node modules
7:02:16 PM: Started saving build plugins
7:02:16 PM: Finished saving build plugins
7:02:16 PM: Started saving yarn cache
7:02:18 PM: Finished saving yarn cache
7:02:18 PM: Started saving pip cache
7:02:18 PM: Finished saving pip cache
7:02:18 PM: Started saving emacs cask dependencies
7:02:18 PM: Finished saving emacs cask dependencies
7:02:18 PM: Started saving maven dependencies
7:02:18 PM: Finished saving maven dependencies
7:02:18 PM: Started saving boot dependencies
7:02:18 PM: Finished saving boot dependencies
7:02:18 PM: Started saving rust rustup cache
7:02:18 PM: Finished saving rust rustup cache
7:02:18 PM: Started saving go dependencies
7:02:18 PM: Finished saving go dependencies
7:02:18 PM: Build failed due to a user error: Build script returned non-zero exit code: 2
7:02:18 PM: Failing build: Failed to build site
7:02:18 PM: Finished processing build request in 44.105s
Iβm using next-auth 4.18.8 for authentication with next13. Here is my package.json file:
{
"name": "wyzr-main-website",
"version": "0.1.0",
"private": true,
"scripts": {
"dev": "next dev -p 3003",
"start": "next start",
"lint": "eslint ./ --ignore-path .gitignore",
"lint:fix": "npm run lint -- --fix",
"build": "next build",
"build:prod": "next build && next export && rm -rf node_modules"
},
"dependencies": {
"@chakra-ui/icons": "^1.0.0",
"@chakra-ui/react": "^1.4.2",
"@emotion/react": "^11.0.0",
"@emotion/styled": "^11.0.0",
"@microsoft/applicationinsights-react-js": "^3.1.5",
"@microsoft/applicationinsights-web": "^2.6.5",
"@netlify/plugin-nextjs": "^4.29.3",
"axios": "^0.21.1",
"file-saver": "^2.0.5",
"formik": "^2.2.9",
"framer-motion": "^4.0.3",
"history": "^5.0.1",
"js-file-download": "^0.4.12",
"next": "latest",
"next-auth": "^4.18.8",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-icons": "^4.2.0",
"react-responsive-carousel": "^3.2.22",
"react-tweet-embed": "^1.3.1",
"swiper": "^7.4.1"
},
"devDependencies": {
"@types/file-saver": "^2.0.4",
"@types/history": "^4.7.9",
"@typescript-eslint/eslint-plugin": "^4.28.1",
"@typescript-eslint/parser": "^4.28.1",
"critters": "^0.0.10",
"eslint": "^7.29.0",
"eslint-config-next": "^11.0.1",
"eslint-plugin-react": "^7.24.0",
"file-loader": "^6.2.0",
"typescript": "^4.3.4"
}
}
The error seems to be coming from next-auth.