# Previous set up for nexts app throws page not found message when deploying

**URL:** <https://answers.netlify.com/t/previous-set-up-for-nexts-app-throws-page-not-found-message-when-deploying/155838>\
**Category:** Support\
**Tags:** deployment\
**Created:** [August 27, 2025, 1:24pm UTC](https://answers.netlify.com/t/previous-set-up-for-nexts-app-throws-page-not-found-message-when-deploying/155838 "2025-08-27T13:24:59Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![rubenanlo](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/rubenanlo/32/67688_2.png) [@rubenanlo](https://answers.netlify.com/u/rubenanlo)\
**Post date:** [August 27, 2025, 1:24pm UTC](https://answers.netlify.com/t/previous-set-up-for-nexts-app-throws-page-not-found-message-when-deploying/155838/1 "2025-08-27T13:24:59Z")

</div>

I had this setup for my nextjs app in netlify to gbuild static websites:

# netlify.toml:

```auto
[build]
  command = "pnpm run build"
  publish = ".next"

```

package.json:

```auto
  "scripts": {
    "build": "next build",
    
  }, 

```

and set env variable: NETLIFY\_NEXT\_PLUGIN\_SKIP: true

I trigger a deployment and got page not found.

I had to revert to the old setup to make this work:

netlify.toml:

```auto
[build]
  command = "pnpm run build"
  publish = "out"

```

package.json:

```auto
  "scripts": {
    "build": "next build",
  },

```

next.config.js:

```auto
const nextConfig = {
  output: "export",
  trailingSlash: true,
  images: {
    unoptimized: true,
  },
};

```

Has there been any issue with setting up nextjs applications during the last month? This issue showed up after coming from vacation. It shows that I should have extended my vacation.

Thanks

---

<div class="post-metadata">

**Author:** ![sid.m](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/sid.m/32/50638_2.png) [@sid.m](https://answers.netlify.com/u/sid.m)\
**Post date:** [August 27, 2025, 3:09pm UTC](https://answers.netlify.com/t/previous-set-up-for-nexts-app-throws-page-not-found-message-when-deploying/155838/2 "2025-08-27T15:09:02Z")

</div>

What’s the site name?

---

<div class="post-metadata">

**Author:** ![rubenanlo](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/rubenanlo/32/67688_2.png) [@rubenanlo](https://answers.netlify.com/u/rubenanlo)\
**Post date:** [August 27, 2025, 3:23pm UTC](https://answers.netlify.com/t/previous-set-up-for-nexts-app-throws-page-not-found-message-when-deploying/155838/3 "2025-08-27T15:23:02Z")

</div>

it’s [https://dashboards.sdgindex.org/](https://dashboards.sdgindex.org/), also the same thing happened in this one: [Benin Sustainable Development Report](https://regional-benin.sdgindex.org/profils/)

---

<div class="post-metadata">

**Author:** ![sid.m](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/sid.m/32/50638_2.png) [@sid.m](https://answers.netlify.com/u/sid.m)\
**Post date:** [August 27, 2025, 3:44pm UTC](https://answers.netlify.com/t/previous-set-up-for-nexts-app-throws-page-not-found-message-when-deploying/155838/4 "2025-08-27T15:44:00Z")

</div>

I’ve routed this to our helpdesk, we’ll follow up via email.
