skip to Main Content

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.

enter image description here

I’m running it on IIS, windows server 2019 with plesk panel

2

Answers


  1. enter image description here

    Have you checked if the Request URL is correct?

    It might be the issue regarding relative path / absolute path.

    Login or Signup to reply.
  2. Had the same issue, and made it running by following:

    1. Check the Document Path, Application Root, and Application Startup file on Node.js Dashboard inside the Plesk.

    It looks like this on my server.
    Node.js Dashboard on Plesk

    1. Also update your next.config.js file with the code below to enable static export.

      const nextConfig = {
      output: ‘export’,

      }

      module.exports = nextConfig

    2. Run npm install and npm build commands and it should work.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search