I have a next js project that works fine with npm run dev.
it also works fine with npm run build and then npm start
it also works fine on localhost on the server.
but no css, or images, or any files works when it’s on the domain.
I’m running it on IIS, windows server 2019 with plesk panel
2
Answers
Have you checked if the Request URL is correct?
It might be the issue regarding relative path / absolute path.
Had the same issue, and made it running by following:
It looks like this on my server.
Also update your next.config.js file with the code below to enable static export.
const nextConfig = {
output: ‘export’,
}
module.exports = nextConfig
Run npm install and npm build commands and it should work.