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 build not exiting with versions of NextJS > 13.4.12 #8788

Merged
merged 7 commits into from
Aug 29, 2023

Conversation

borisno2
Copy link
Member

The PR adds a process.exit(0) after the next build in the keystone build cli.
Fixes #8760
Fixes #8581

This is required due to the use of the undocumented next/dist/build see - vercel/next.js#54494

@borisno2 borisno2 requested a review from dcousens August 29, 2023 05:28
@borisno2 borisno2 changed the title Fix keystone build hanging with latest versions of NextJS Fix keystone build not exiting with latest versions of NextJS Aug 29, 2023
@dcousens dcousens changed the title Fix keystone build not exiting with latest versions of NextJS Fix keystone build process not exiting with latest versions of NextJS Aug 29, 2023
@codesandbox-ci
Copy link

codesandbox-ci bot commented Aug 29, 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.

Latest deployment of this branch, based on commit 98ccc48:

Sandbox Source
@keystone-6/sandbox Configuration

@borisno2 borisno2 changed the title Fix keystone build process not exiting with latest versions of NextJS Fix keystone build not exiting with versions of NextJS > 13.4.12 Aug 29, 2023
@dcousens dcousens self-assigned this Aug 29, 2023
@dcousens dcousens merged commit 7b2bb08 into main Aug 29, 2023
58 checks passed
@dcousens dcousens deleted the exit-next-build branch August 29, 2023 23:55
return build(cwd, defaultFlags(flags, { frozen: false, prisma: true, ui: true }));
return build(cwd, defaultFlags(flags, { frozen: false, prisma: true, ui: true })).then(() =>
process.exit(0)
);
Copy link
Member

Choose a reason for hiding this comment

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

The cli function shouldn't call process.exit(0), as that will impact on downstream users of the cli export.
This needs to be in scripts/index.ts.

I have fixed this in fca0f5c as part of #8790 as it was causing my tests to fail.

@dcousens dcousens added the 🐛 bug Unresolved bug label Aug 30, 2023
@Seyid-cmd
Copy link

When will be this release? I cannot wait to see my keystone app in production.

@ttbarnes
Copy link
Contributor

ttbarnes commented Sep 8, 2023

Nice work, can't wait for the next release 👍

@gautamsi gautamsi mentioned this pull request Sep 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Unresolved bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Build command gets stuck CLI build and prisma migrate commands never exit
4 participants