Skip to content

Build Error - Plugin "@netlify/plugin-nextjs" internal error  #2024

Closed
@joeluna17

Description

@joeluna17

Pushed new code and during deployment I'm receiving and error from the plugin. This worked last for me on 3/18/2023. I've tried deselecting the plugin from runtime, and then reselecting then recaching and redeploying with no luck. Below is the error output.

4:02:29 PM: build-image version: 6c82004ef0368b3a0232c6837cead23188bb347e (focal)
4:02:29 PM: buildbot version: 0dfbdb6e6e614fd26450cfc6bacb47c4c6fd9626
4:02:29 PM: Building without cache
4:02:29 PM: Starting to prepare the repo for build
4:02:29 PM: No cached dependencies found. Cloning fresh repo
4:02:29 PM: git clone --filter=blob:none git@gitlab.com:joelunaGetCheckApp/check-forms-app
4:02:30 PM: Preparing Git Reference refs/heads/main
4:02:32 PM: Parsing package.json dependencies
4:02:33 PM: Different build dir detected, going to use the one specified in the Netlify configuration file: 'apps' versus 'apps/' in the Netlify UI
4:02:33 PM: Different publish path detected, going to use the one specified in the Netlify configuration file: 'dist/apps/check-payments-marketing/.next' versus '../dist/apps/check-payments-marketing/.next' in the Netlify UI
4:02:33 PM: Starting to install dependencies
4:02:33 PM: Python version set to 3.8
4:02:33 PM: Started restoring cached go cache
4:02:33 PM: Finished restoring cached go cache
4:02:33 PM: Installing Go version 1.19.5 (requested 1.19.5)
4:02:38 PM: go version go1.19.5 linux/amd64
4:02:38 PM: Using PHP version 8.0
4:02:38 PM: v16.20.0 is already installed.
4:02:38 PM: Now using node v16.20.0 (npm v8.19.4)
4:02:39 PM: Enabling Node.js Corepack
4:02:39 PM: Started restoring cached build plugins
4:02:39 PM: Finished restoring cached build plugins
4:02:39 PM: Attempting Ruby version 2.7.2, read from environment
4:02:39 PM: Using Ruby version 2.7.2
4:02:40 PM: Install dependencies script success
4:02:40 PM: Starting build script
4:02:40 PM: Using stage install dependencies
4:02:41 PM: Detected 2 framework(s)
4:02:41 PM: "next-nx" at version "unknown"
4:02:41 PM: "create-react-app" at version "unknown"
4:02:41 PM: Section completed: initializing
4:02:42 PM: ​
4:02:42 PM: Netlify Build
4:02:42 PM: ────────────────────────────────────────────────────────────────
4:02:42 PM: ​
4:02:42 PM: ❯ Version
4:02:42 PM: @netlify/build 29.9.0
4:02:42 PM: ​
4:02:42 PM: ❯ Flags
4:02:42 PM: baseRelDir: true
4:02:42 PM: buildId: 6429ed5ef88833550b63cea1
4:02:42 PM: deployId: 6429ed5ef88833550b63cea3
4:02:42 PM: ​
4:02:42 PM: ❯ Current directory
4:02:42 PM: /opt/build/repo/apps
4:02:42 PM: ​
4:02:42 PM: ❯ Config file
4:02:42 PM: No config file was defined: using default values.
4:02:42 PM: ​
4:02:42 PM: ❯ Context
4:02:42 PM: production
4:02:42 PM: ​
4:02:42 PM: ❯ Installing plugins
4:02:42 PM: - @netlify/plugin-nextjs@4.33.0
4:02:53 PM: ​
4:02:53 PM: ❯ Using Next.js Runtime - v4.33.0
4:02:54 PM: ​
4:02:54 PM: Plugin "@netlify/plugin-nextjs" internal error
4:02:54 PM: ────────────────────────────────────────────────────────────────
4:02:54 PM: ​
4:02:54 PM: Error message
4:02:54 PM: Could not import plugin:
4:02:54 PM: Error: Could not find Next.js server
4:02:54 PM: ​
4:02:54 PM: Plugin details
4:02:54 PM: Package: @netlify/plugin-nextjs
4:02:54 PM: Version: 4.33.0
4:02:54 PM: Repository: git+https://github.com/netlify/next-runtime.git
4:02:54 PM: npm link: https://www.npmjs.com/package/@netlify/plugin-nextjs
4:02:54 PM: Report issues: https://github.com/netlify/next-runtime/issues
4:02:54 PM: ​
4:02:54 PM: Error location
4:02:54 PM: While loading "@netlify/plugin-nextjs" from Netlify app
4:02:54 PM: at getNextServer (/opt/build/repo/apps/.netlify/plugins/node_modules/@netlify/plugin-nextjs/lib/templates/handlerUtils.js:169:19)
4:02:54 PM: at Object. (/opt/build/repo/apps/.netlify/plugins/node_modules/@netlify/plugin-nextjs/lib/templates/server.js:5:53)
4:02:54 PM: at Module._compile (node:internal/modules/cjs/loader:1196:14)
4:02:54 PM: at Object.Module._extensions..js (node:internal/modules/cjs/loader:1250:10)
4:02:54 PM: at Module.load (node:internal/modules/cjs/loader:1074:32)
4:02:54 PM: at Function.Module._load (node:internal/modules/cjs/loader:909:12)
4:02:54 PM: at Module.require (node:internal/modules/cjs/loader:1098:19)
4:02:54 PM: at require (node:internal/modules/cjs/helpers:108:18)
4:02:54 PM: at Object. (/opt/build/repo/apps/.netlify/plugins/node_modules/@netlify/plugin-nextjs/lib/templates/getHandler.js:14:31)
4:02:54 PM: at Module._compile (node:internal/modules/cjs/loader:1196:14)
4:02:54 PM: ​
4:02:54 PM: Resolved config
4:02:54 PM: build:
4:02:54 PM: base: /opt/build/repo/apps
4:02:54 PM: command: npm i -g nx@latest && npm i && npm run build check-payments-marketing --configuration=production
4:02:54 PM: commandOrigin: ui
4:02:54 PM: environment:
4:02:54 PM: - NEXT_PUBLIC_MAIL_SERVICE_URL
4:02:54 PM: publish: /opt/build/repo/dist/apps/check-payments-marketing/.next
4:02:54 PM: publishOrigin: ui
4:02:54 PM: plugins:
4:02:54 PM: - inputs: {}
4:02:54 PM: origin: ui
4:02:54 PM: package: '@netlify/plugin-nextjs'
4:02:55 PM: Caching artifacts
4:02:55 PM: Started saving build plugins
4:02:55 PM: Finished saving build plugins
4:02:56 PM: Failed during stage 'building site': Build script returned non-zero exit code: 3 (https://ntl.fyi/exit-code-3)
4:02:55 PM: Started saving pip cache
4:02:55 PM: Finished saving pip cache
4:02:55 PM: Started saving emacs cask dependencies
4:02:55 PM: Finished saving emacs cask dependencies
4:02:55 PM: Started saving maven dependencies
4:02:55 PM: Finished saving maven dependencies
4:02:55 PM: Started saving boot dependencies
4:02:55 PM: Finished saving boot dependencies
4:02:55 PM: Started saving rust rustup cache
4:02:55 PM: Finished saving rust rustup cache
4:02:55 PM: Started saving go dependencies
4:02:55 PM: Finished saving go dependencies
4:02:56 PM: Build failed due to a plugin error: Build script returned non-zero exit code: 3
4:02:56 PM: Failing build: Failed to build site
4:02:56 PM: Finished processing build request in 27.342s

Metadata

Metadata

Assignees

Labels

type: bugcode to address defects in shipped code

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions