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

Fix keystone dev errors for next@^13.4.0 #8568

Merged
merged 3 commits into from May 11, 2023

Conversation

MohammadKurjieh
Copy link
Contributor

@MohammadKurjieh MohammadKurjieh commented May 10, 2023

This resolves: #8553

On next version 13.4.0 and higher setting the appDir to false is mandatory in the next config file.
Ref: vercel/next.js#49261 and vercel/next.js#49251

set appDir in next config to be false
@changeset-bot

This comment was marked as resolved.

@codesandbox-ci
Copy link

codesandbox-ci bot commented May 10, 2023

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

@@ -3,6 +3,9 @@ import Path from 'path';
import withPreconstruct from '@preconstruct/next';

export const config = withPreconstruct({
experimental: {
appDir: false,
Copy link
Member

@dcousens dcousens May 11, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder, won't this flag disappear in an upcoming next patch release? 🤔

Copy link
Member

@dcousens dcousens left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, but if experimental.appDir drops in an upcoming next version, we need to resolve this differently.
Users might actually want appDir: true too (though, this might not affect them if they are doing their own next app)

@dcousens dcousens changed the title Fix keystone crashing on next v13.4.0 and higher Fix keystone dev errors for next@^13.4.0 May 11, 2023
@Thinkscape
Copy link

LGTM, but if experimental.appDir drops in an upcoming next version, we need to resolve this differently. Users might actually want appDir: true too (though, this might not affect them if they are doing their own next app)

But this is only for the admin ui, which means that it only affects users that want to use appDir inside the /admin/ folder. Probably the complete fix would be converting the current /admin/pages* generators to app router.

@dcousens
Copy link
Member

dcousens commented May 11, 2023

Until we have an alternative solution, this is good to go, thanks @MohammadKurjieh

@dcousens dcousens merged commit 1a997d1 into keystonejs:main May 11, 2023
58 checks passed
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

Successfully merging this pull request may close these issues.

Next ^13.4 is not working with Keystone
3 participants