deiucanta/chatpad

The one-click deployment to Netlify doesn't work, fails on Build

KeepCreatingOnline opened this issue · 0 comments

Here is the build log, something to do with NextJS plugins.

8:59:21 PM: Failed during stage 'building site': Build script returned non-zero exit code: 2 (https://ntl.fyi/exit-code-2)
8:57:44 PM: build-image version: 1ae4e4d7d5e3544ab1eb7f270391cdbb47c1e1e5 (focal)
8:57:44 PM: buildbot version: 1ae4e4d7d5e3544ab1eb7f270391cdbb47c1e1e5
8:57:44 PM: Fetching cached dependencies
8:57:45 PM: Failed to fetch cache, continuing with build
8:57:45 PM: Starting to prepare the repo for build
8:57:45 PM: No cached dependencies found. Cloning fresh repo
8:57:45 PM: git clone --filter=blob:none https://github.com/deiucanta/chatpad
8:57:45 PM: Preparing Git Reference refs/heads/main
8:57:47 PM: Starting to install dependencies
8:57:47 PM: Python version set to 3.8
8:57:47 PM: Attempting Ruby version 2.7.2, read from environment
8:57:48 PM: Using Ruby version 2.7.2
8:57:48 PM: Started restoring cached go cache
8:57:48 PM: Finished restoring cached go cache
8:57:48 PM: go version go1.19.10 linux/amd64
8:57:49 PM: Using PHP version 8.0
8:57:50 PM: v18.16.1 is already installed.
8:57:50 PM: Now using node v18.16.1 (npm v9.5.1)
8:57:50 PM: Enabling Node.js Corepack
8:57:50 PM: Started restoring cached build plugins
8:57:50 PM: Finished restoring cached build plugins
8:57:50 PM: Started restoring cached corepack dependencies
8:57:50 PM: Finished restoring cached corepack dependencies
8:57:50 PM: Started restoring cached yarn cache
8:57:50 PM: Finished restoring cached yarn cache
8:57:50 PM: No yarn workspaces detected
8:57:50 PM: Started restoring cached node modules
8:57:50 PM: Finished restoring cached node modules
8:57:51 PM: Installing npm packages using Yarn version 1.22.19
8:57:51 PM: yarn install v1.22.19
8:57:51 PM: warning package.json: dependencies has dependency @types/react with range 18.0.28 that collides with a dependency in devDependencies of the same name with version ^18.0.28
8:57:51 PM: warning package.json: dependencies has dependency @types/react-dom with range 18.0.11 that collides with a dependency in devDependencies of the same name with version ^18.0.11
8:57:51 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.
8:57:51 PM: warning chatpad: dependencies has dependency @types/react with range 18.0.28 that collides with a dependency in devDependencies of the same name with version ^18.0.28
8:57:51 PM: warning chatpad: dependencies has dependency @types/react-dom with range 18.0.11 that collides with a dependency in devDependencies of the same name with version ^18.0.11
8:57:51 PM: [1/4] Resolving packages...
8:57:51 PM: [2/4] Fetching packages...
8:58:10 PM: [3/4] Linking dependencies...
8:58:19 PM: [4/4] Building fresh packages...
8:58:19 PM: Done in 28.35s.
8:58:19 PM: npm packages installed using Yarn
8:58:20 PM: Install dependencies script success
8:58:20 PM: Starting build script
8:58:21 PM: Detected 2 framework(s)
8:58:21 PM: next at version 13.2.4
8:58:21 PM: parcel at version 2.8.3
8:58:21 PM: Section completed: initializing
8:58:22 PM: ​
8:58:22 PM: Netlify Build
8:58:22 PM: ────────────────────────────────────────────────────────────────
8:58:22 PM: ​
8:58:22 PM: ❯ Version
8:58:22 PM: @netlify/build 29.15.3
8:58:22 PM: ​
8:58:22 PM: ❯ Flags
8:58:22 PM: baseRelDir: true
8:58:22 PM: buildId: 64a8b4837ed34f2c122eafe3
8:58:22 PM: deployId: 64a8b4837ed34f2c122eafe5
8:58:22 PM: ​
8:58:22 PM: ❯ Current directory
8:58:22 PM: /opt/build/repo
8:58:22 PM: ​
8:58:22 PM: ❯ Config file
8:58:22 PM: No config file was defined: using default values.
8:58:22 PM: ​
8:58:22 PM: ❯ Context
8:58:22 PM: production
8:58:22 PM: ​
8:58:22 PM: ❯ Installing plugins
8:58:22 PM: - @netlify/plugin-nextjs@4.39.0
8:58:32 PM: ​
8:58:32 PM: ❯ Using Next.js Runtime - v4.39.0
8:58:33 PM: ​
8:58:33 PM: @netlify/plugin-nextjs (onPreBuild event)
8:58:33 PM: ────────────────────────────────────────────────────────────────
8:58:33 PM: ​
8:58:33 PM: No Next.js cache to restore.
8:58:33 PM: Netlify configuration property build.environment.NEXT_PRIVATE_TARGET value changed.
8:58:33 PM: ​
8:58:33 PM: (@netlify/plugin-nextjs onPreBuild completed in 13ms)
8:58:33 PM: ​
8:58:33 PM: Build command from Netlify app
8:58:33 PM: ────────────────────────────────────────────────────────────────
8:58:33 PM: ​
8:58:33 PM: $ yarn build
8:58:34 PM: yarn run v1.22.19
8:58:34 PM: warning package.json: dependencies has dependency @types/react with range 18.0.28 that collides with a dependency in devDependencies of the same name with version ^18.0.28
8:58:34 PM: warning package.json: dependencies has dependency @types/react-dom with range 18.0.11 that collides with a dependency in devDependencies of the same name with version ^18.0.11
8:58:34 PM: $ parcel build
8:58:34 PM: Building...
8:58:38 PM: Bundling...
8:58:38 PM: Packaging & Optimizing...
8:59:16 PM: ✨ Built in 41.90s
8:59:16 PM: dist/index.html 778 B 449ms
8:59:16 PM: dist/favicon.e776fd66.png 6.04 KB 231ms
8:59:16 PM: dist/index.9754b565.js ⚠️ 2.31 MB 37.23s
8:59:16 PM: dist/index.80919bb6.css 416 B 239ms
8:59:16 PM: dist/index.c8fe9a3b.js ⚠️ 2.31 MB 37.17s
8:59:16 PM: Done in 42.64s.
8:59:16 PM: ​
8:59:16 PM: (build.command completed in 42.8s)
8:59:16 PM: ​
8:59:16 PM: @netlify/plugin-nextjs (onBuild event)
8:59:16 PM: ────────────────────────────────────────────────────────────────
8:59:16 PM: ​
8:59:16 PM: ​
8:59:16 PM: Plugin @netlify/plugin-nextjs failed
8:59:16 PM: ────────────────────────────────────────────────────────────────
8:59:16 PM: ​
8:59:16 PM: Error message
8:59:16 PM: Error: The directory /opt/build/repo/.next does not contain a Next.js production build. Perhaps the build command was not run, or you specified the wrong publish directory.
8:59:16 PM: In most cases it should be set to .next, unless you have chosen a custom distDir in your Next config.
8:59:16 PM: If you are using next export then you should set the environment variable NETLIFY_NEXT_PLUGIN_SKIP to true.
8:59:16 PM: ​
8:59:16 PM: Plugin details
8:59:16 PM: Package: @netlify/plugin-nextjs
8:59:16 PM: Version: 4.39.0
8:59:16 PM: Repository: git+https://github.com/netlify/next-runtime.git
8:59:16 PM: npm link: https://www.npmjs.com/package/@netlify/plugin-nextjs
8:59:16 PM: Report issues: https://github.com/netlify/next-runtime/issues
8:59:16 PM: ​
8:59:16 PM: Error location
8:59:16 PM: In onBuild event in @netlify/plugin-nextjs from Netlify app
8:59:16 PM: ​
8:59:16 PM: Resolved config
8:59:16 PM: build:
8:59:16 PM: command: yarn build
8:59:16 PM: commandOrigin: ui
8:59:16 PM: environment:
8:59:16 PM: - NEXT_PRIVATE_TARGET
8:59:16 PM: publish: /opt/build/repo/.next
8:59:16 PM: publishOrigin: ui
8:59:16 PM: plugins:
8:59:16 PM: - inputs: {}
8:59:16 PM: origin: ui
8:59:16 PM: package: '@netlify/plugin-nextjs'
8:59:17 PM: Caching artifacts
8:59:17 PM: Started saving node modules
8:59:17 PM: Finished saving node modules
8:59:17 PM: Started saving build plugins
8:59:17 PM: Finished saving build plugins
8:59:17 PM: Started saving corepack cache
8:59:17 PM: Finished saving corepack cache
8:59:17 PM: Started saving yarn cache
8:59:20 PM: Finished saving yarn cache
8:59:20 PM: Started saving pip cache
8:59:20 PM: Finished saving pip cache
8:59:20 PM: Started saving emacs cask dependencies
8:59:20 PM: Finished saving emacs cask dependencies
8:59:20 PM: Started saving maven dependencies
8:59:20 PM: Finished saving maven dependencies
8:59:20 PM: Started saving boot dependencies
8:59:20 PM: Finished saving boot dependencies
8:59:20 PM: Started saving rust rustup cache
8:59:20 PM: Finished saving rust rustup cache
8:59:20 PM: Started saving go dependencies
8:59:20 PM: Finished saving go dependencies
8:59:21 PM: Build failed due to a user error: Build script returned non-zero exit code: 2
8:59:21 PM: Failing build: Failed to build site
8:59:22 PM: Finished processing build request in 1m37.436s