Closed enzo-mourany closed 2 years ago
Hi @enzo-mourany
Can you provide some more details of your setup please, including your build command and your next.config.js
Sure @ascorbic
Build command : nom run build next.config.js :
`/* @type {import('next').NextConfig} / const nextConfig = { reactStrictMode: true, }
module.exports = nextConfig; `
Thanks. Can you change your publish
directory from build
to .next
, either in the UI or in the netlify.toml
It's work, thanks @ascorbic
Summary
Plugin "@netlify/plugin-nextjs" failed Error: The directory "/opt/build/repo/build" does not contain a Next.js production build. Perhaps the build command was not run, or you specified the wrong publish directory.
Steps to reproduce
A link to a reproduction repository
No response
Plugin version
4.7.0
More information about your build
netlify.toml
)What OS are you using?
No response
Your netlify.toml file
`netlify.toml`
```toml # Paste content of your `netlify.toml` file here ```Your public/_redirects file
`_redirects`
```toml # Paste content of your `_redirects` file here ```Your
next.config.js
file`next.config.js`
```toml # Paste content of your `next.config.js` file here. Check there is no private info in there. ```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. ```