How would I change my next.js site to html?

I want to change my next.js site to basic HTML mainly because I lack the expertise to make a functioning site. I have tried clearing the build commands and replacing everything in the GitHub repo with an index.html but netlify still thinks that my site is a next.js site.

I would delete the site and start over but I have some DNS settings set up for my custom domain that I don’t want to have to set up again.

Any help?

URL: lioncat6.netlify.app

Deploy Error:

  • Plugin “@netlify/plugin-nextjs” failed

Error: Your publish directory is pointing to the base directory of your site. This is not supported for Next.js sites, and is probably a mistake. In most cases it should be set to “.next”, unless you have chosen a custom “distDir” in your Next config, or the Next site is in a subdirectory.

Hi @Lioncat6, you must change your build settings by navigating to Site settings > Build & deploy > Continuous Deployment > Build settings .

Once you are on the the build settings page kindly set the base directory to / and then set the build command blank.

After click on your site name and click on deploys.
Scroll down and click on the trigger deploy dropdown button and then select clear cache and deploy site

Let me know the outcome.

Thanks.

I set the base directory as you said then cleared the cache and deployed, but I still received the same outcome…

I could be missing a file telling netlify what to do in my GitHub repo because I deleted everything but the .git folder when I put just the HTML file in there.

It’s not clear that just removing the next.js build step would lead to a functioning website anyway, just to clarify @clarnx 's advice. If you have plain html already written, and upload it instead of your source code for the nextjs site, that is probably the most straightforward way to “change” your build.

Note that you can connect a new repository, or disconnect the repository entirely, both from here: Netlify App

…which is also an easier way to reset things than creating a new site and updating DNS, etc.

1 Like

Thank you! it worked!

1 Like