Replies: 1 comment
-
|
For cPanel/static hosting, you need a real static export, not the normal server build. In current Next.js, that means adding this to /** @type {import('next').NextConfig} */
const nextConfig = {
output: 'export',
}
module.exports = nextConfigThen run: next buildThat should produce an If you only see
Static export will not support things that require a Next.js server, such as API routes, middleware, server actions, ISR, or the default image optimizer. If the app depends on those, cPanel-style static hosting is the wrong target; you would need Node hosting or a platform that runs the Next server. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Summary
I am trying to host my site on a panel. Everytime I use next build it returns CSS and js but not HTML pages and my server cannot interpret that.
Additional information
No response
Example
It justs returns an out folder that contains an _next folder which contains some CSS files and js files
No response
Beta Was this translation helpful? Give feedback.
All reactions