Unable to deploy my NextJs in cloudflare pages.
I'm using this command to deploy my "NextJs" app:
npm run build && npx next exportMy build is successful and next export is failed and returning this message:
⨯ next export
has been removed in favor of 'output: export' in next.config.js. Learn more: https://nextjs.org/docs/app/building-your-application/deploying/static-exports
I have read the above article too. It saying me to add output: export in the next.config.js file.
There is already that line added in my next config file.
Please help me to over come this issue.
#general-helpGuides: Static Exports | Next.js
Next.js enables starting as a static site or Single-Page Application (SPA), then later optionally upgrading to use features that require a server.
1 Reply
This issue was due to next version.
I fixed this issue. the "next export" command is gone in nextjs -v15 and above.
I used only npm run build. and it automatically exported in cloudflare.
#Resolved #Fixed