Skip to content
Discussion options

You must be logged in to vote

Spend few hours in this issue, finally found a fix.

Turns out my project is using static export output: "export". This doenst support API: https://nextjs.org/docs/pages/guides/static-exports.

Changed my config to

/** @type {import('next').NextConfig} */
const nextConfig = {
  // output: 'export', // Outputs a Single-Page Application (SPA).
  // distDir: './dist', // Changes the build output directory to `./dist/`.
  experimental: {
    reactCompiler: true,
  },
}
 
export default nextConfig

Now working flawlessly

Replies: 3 comments 13 replies

Comment options

You must be logged in to vote
2 replies
@sang4lv
Comment options

@rthidden
Comment options

Comment options

You must be logged in to vote
9 replies
@hookdump
Comment options

@lukasz-szyszkowski
Comment options

@Satvik-Katochh
Comment options

@AlenPelin
Comment options

@jaogarcia97
Comment options

Comment options

You must be logged in to vote
2 replies
@Vatsalsoni13
Comment options

@elahinexustech
Comment options

Answer selected by pawlean
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
Route Handlers Related to Route Handlers.
Converted from issue

This discussion was converted from issue #68381 on August 06, 2024 06:14.