Skip to content

Local builds: netlify build followed by netlify deploy doesn't work with Next.js sites #2501

Open
@rks118

Description

@rks118

Local build (netlify build) will output _next in .next, but disappear immediately.

As a result, the website could not find js/css/image resources after I deployed(netlify deploy --prod) it.

Screen Record:

Screen.Recording.2024-06-20.at.18.20.39.mov

netlify.toml:

[build]
  command = "pnpm run build"
  publish = ".next"
 
[[plugins]]
  package = "@netlify/plugin-nextjs"

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions