Skip to content

Bug:/Idea: npx next export is not supported anymore in Next.js #7

@AlessandroVol23

Description

@AlessandroVol23

Expected Behaviour

I used the default next.js starter kit npx create-next-app@latest nextjs-blog --use-pnpm --example "https://github.com/vercel/next-learn/tree/main/basics/learn-starter"

My expected behaviour would be that the deploy step is deploying the static files.

Current Behaviour

The build step fails with the following logs:

[Container] 2024/06/05 06:01:35.090350 Running command npx next export
73 | ⨯
74 | `next export` has been removed in favor of 'output: export' in next.config.js.
75 | Learn more: https://nextjs.org/docs/app/building-your-application/deploying/static-exports
76 |  
77

I know that only SSG and SPA are supported right now. But I think the developer experience could be improved if the CLI locally already fails or if the build command understands that next version xyz is not supporting this command anymore.

Code snippet

1. `npx create-next-app@latest nextjs-blog --use-pnpm --example "https://github.com/vercel/next-learn/tree/main/basics/learn-starter"`
2. `cloudfront-hosting-toolkit init`
3. `cloudfront-hosting-toolkit deploy`

Possible Solution

Show a warning locally / break locally

Steps to Reproduce

  1. npx create-next-app@latest nextjs-blog --use-pnpm --example "https://github.com/vercel/next-learn/tree/main/basics/learn-starter"
  2. cloudfront-hosting-toolkit init
  3. cloudfront-hosting-toolkit deploy

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions