Closed
Description
Summary
Right now if you want to set a base directory in the netlify.toml
to something other than the base of the whole git repo, like so:
[build]
base = "website"
You will get an error like this:
7:37:52 PM: Error message
7:37:52 PM: Error: The directory ".next" does not contain a Next.js production build. Perhaps the build command was not run, or you specified the wrong publish directory.
7:37:52 PM: In most cases it should be set to ".next", unless you have chosen a custom "distDir" in your Next config.
7:37:52 PM: If you are using "next export" then the Essential Next.js plugin should be removed. See https://ntl.fyi/remove-plugin for details.
There is an old documentation file that has been deleted that covers what to do in this case (have another netlify.toml
in that directory), but that is not immediately obvious to the user.
Steps to reproduce
Make a Next.js repo where the app is in its own folder
Point the netlify.toml to that folder
Look at the failed build
A link to a reproduction repository
https://github.com/SaraVieira/obsidian-notes-publish-plugin
Plugin version
4.0.0
More information about your build
- I am building using the CLI
- I am building using file-based configuration (
netlify.toml
)