Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when trying to build for NextJS 12.3 #23

Closed
bobeagan opened this issue Sep 16, 2022 · 2 comments
Closed

Error when trying to build for NextJS 12.3 #23

bobeagan opened this issue Sep 16, 2022 · 2 comments

Comments

@bobeagan
Copy link

The current injection for the default template causes a failure due to specifying the unoptimized value for images to be wrapped in an experimental block. const nextConfig = {experimental: {images: {unoptimized: true}},basePath: "/test"}

However, as of 12.3 this is no longer necessary and will cause build failure of:

Error: Image Optimization using Next.js' default loader is not compatible with next export.

Workaround is to explicitly set the correct value in the next.config.js. Suggesting to either determine version or allow it to be specified in order to conditionally apply the experimental wrapper.

Source: https://nextjs.org/blog/next-12-3#disable-image-optimization-stable

@TheKojuEffect
Copy link
Contributor

Here's a PR for this issue: #33

@JamesMGreene
Copy link
Contributor

Fixed by #33 / #37

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants