Description
Summary
4:47:55 AM: Error message
4:47:55 AM: Could not import plugin:
4:47:55 AM: Error: Could not find Next.js server
4:47:55 AM:
4:47:55 AM: Plugin details
4:47:55 AM: Package: @netlify/plugin-nextjs
4:47:55 AM: Version: 4.36.0
4:47:55 AM: Repository: git+https://github.com/netlify/next-runtime.git
4:47:55 AM: npm link: https://www.npmjs.com/package/@netlify/plugin-nextjs
4:47:55 AM: Report issues: https://github.com/netlify/next-runtime/issues
4:47:55 AM:
4:47:55 AM: Error location
4:47:55 AM: While loading "@netlify/plugin-nextjs" from Netlify app
4:47:55 AM: at getNextServer (/opt/build/repo/.netlify/plugins/node_modules/@netlify/plugin-nextjs/lib/templates/handlerUtils.js:169:19)
4:47:55 AM: at Object. (/opt/build/repo/.netlify/plugins/node_modules/@netlify/plugin-nextjs/lib/templates/server.js:5:53)
4:47:55 AM: at Module._compile (node:internal/modules/cjs/loader:1196:14)
4:47:55 AM: at Object.Module._extensions..js (node:internal/modules/cjs/loader:1250:10)
4:47:55 AM: at Module.load (node:internal/modules/cjs/loader:1074:32)
4:47:56 AM: Failed during stage 'building site': Build script returned non-zero exit code: 3 (https://ntl.fyi/exit-code-3)
4:47:55 AM: at Function.Module._load (node:internal/modules/cjs/loader:909:12)
4:47:55 AM: at Module.require (node:internal/modules/cjs/loader:1098:19)
4:47:55 AM: at require (node:internal/modules/cjs/helpers:108:18)
4:47:55 AM: at Object. (/opt/build/repo/.netlify/plugins/node_modules/@netlify/plugin-nextjs/lib/templates/getHandler.js:14:31)
4:47:55 AM: at Module._compile (node:internal/modules/cjs/loader:1196:14)
4:47:55 AM:
4:47:55 AM: Resolved config
4:47:55 AM: build:
4:47:55 AM: publish: /opt/build/repo
4:47:55 AM: publishOrigin: default
4:47:55 AM: plugins:
4:47:55 AM: - inputs: {}
4:47:55 AM: origin: ui
4:47:55 AM: package: '@netlify/plugin-nextjs'
Steps to reproduce
Clone the repo and then build from it
A link to a reproduction repository
https://github.com/mckaywrigley/chatbot-ui
Next Runtime version
v4.36.0
Is your issue related to the app
directory (beta)?
- Yes, I am using the
app
directory
More information about your build
- I am building using the CLI
- I am building using file-based configuration (
netlify.toml
)
What OS are you using?
Windows
Your netlify.toml file
`netlify.toml`
# Paste content of your `netlify.toml` file here
Your public/_redirects file
`_redirects`
# Paste content of your `_redirects` file here
Your next.config.js
file
const { i18n } = require('./next-i18next.config');
/** @type {import('next').NextConfig} */
const nextConfig = {
i18n,
reactStrictMode: true,
webpack(config, { isServer, dev }) {
config.experiments = {
asyncWebAssembly: true,
layers: true,
};
return config;
},
};
module.exports = nextConfig;
Builds logs (or link to your logs)
Build logs
# Paste logs here
Function logs
Function logs
# Paste logs here
.next JSON files
generated .next JSON files
# Paste file contents here. Please check there isn't any private info in them
# You can either build locally, or download the deploy from Netlify by clicking the arrow next to the deploy time.