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

next@>13.2.2 causes "keystone build" to hang #8412

Closed
dfinton opened this issue Mar 25, 2023 · 10 comments
Closed

next@>13.2.2 causes "keystone build" to hang #8412

dfinton opened this issue Mar 25, 2023 · 10 comments
Labels
🐛 bug Unresolved bug dependencies Related to our dependencies

Comments

@dfinton
Copy link

dfinton commented Mar 25, 2023

Steps to reproduce
After I update my keystone dependencies, yarn build hangs indefinitely on:

info  - Creating an optimized production build ...

yarn dev does complete and serves data, and I am able to login to the admin UI. It's only when trying to make a production build does it hang.

I checked for legacy issues matching what I was seeing on the various forums but nothing appears to be applicable to this circumstance. I'm not running out of processes or memory. I tried blowing away the existing build directory but nothing seems to work, and without an error message I don't have a lot to go on in terms of troubleshooting.

What was expected
Either for yarn build to complete without errors, or in the event of a failure, to report an error message

Screenshot
keystone-hang

Contextual Information

$ node --version
v18.15.0
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 22.04.2 LTS
Release:        22.04
Codename:       jammy

package.json dependencies before update:

    "@keystone-6/auth": "^5.0.0",
    "@keystone-6/core": "^3.0.1",
    "@keystone-6/fields-document": "^5.0.0",
    "dotenv": "^16.0.3",
    "typescript": "^4.8.0"

after update:

    "@keystone-6/auth": "^7.0.0",
    "@keystone-6/core": "^5.1.0",
    "@keystone-6/fields-document": "^7.0.0",
    "dotenv": "^16.0.3",
    "typescript": "^4.8.0"
@dfinton
Copy link
Author

dfinton commented Mar 25, 2023

Just wanted to leave an update: I am able to reproduce this issue by creating a brand new app with keystone-create-app. Even with an unmodified app, the build process hangs.

$ yarn create keystone-app surazal-net-cms
yarn create v1.22.19
...
Done in 33.24s.
$ cd surazal-net-cms
$ yarn dev
yarn run v1.22.19
$ keystone dev
...
event - compiled client and server successfully in 4.7s (1699 modules)
✅ Admin UI ready
^C
$ yarn build
yarn run v1.22.19
$ keystone build
...
info  - Creating an optimized production build ...

If I run yarn build --no-ui the process does not hang and completes successfully, but of course yarn start fails because it can't run the UI and aborts with an error.

@dfinton
Copy link
Author

dfinton commented Mar 25, 2023

Further update: I tried this on my other platform to rule out an issue on my local development environment. The build also hangs on my Debian server:

$ lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description:    Debian GNU/Linux 11 (bullseye)
Release:        11
Codename:       bullseye

I also ran npm cache clean --force and ran everything from scratch to rule out a corrupted cache in both of my environments.

@dcousens
Copy link
Member

dcousens commented Mar 26, 2023

@dfinton, @borisno2 and I noticed this bug late last week, and it's a result of using next>13.2.2.
In our recent pull request #8398, we fixed next to this version and are preparing a release in the next few days.

1501892#diff-0b810c38f3c138a3d5e44854edefd5eb966617ca84e62f06511f60acc40546c7R283

I don't know exactly what the problem is, but, the resolution is to not use next>13.2.2 for now.

@dcousens dcousens added dependencies Related to our dependencies 🐛 bug Unresolved bug labels Mar 26, 2023
@dcousens dcousens changed the title "keystone build" hangs indefinintely after update, no errors or logs indicating why next@>13.2.2 causes "keystone build" to hang Mar 26, 2023
@borisno2
Copy link
Member

borisno2 commented Mar 27, 2023

Tested with the the following version of Next

So it is just with Next version 13.2.4 where the build is broken and should be resolved in 13.2.5

@AllanFerencz
Copy link

@borisno2 Looks like Next is on 13.3.0 now.

I still have the hanging build issue

@dcousens
Copy link
Member

@AllanFerencz can you help with a reproduction?

@AllanFerencz
Copy link

Sure, It's reproducible with the current version of Keystone 6.

  1. Make a new project
  2. yarn
  3. yarn build - Hanging happens here

The latest version of Next in the package.json is pointing to version 13.2.2

@borisno2
Copy link
Member

Hi @AllanFerencz
I am unable to replicate. I am doing the following

  1. yarn create keystone-app
  2. cd into directory
  3. yarn build
    Build happens as expected, if I use yarn why next I can see that it is installing next@13.3.0.

Are you using yarn create keystone-app to make a new project or another method?

@AllanFerencz
Copy link

Awesome, It's working as expected. :)

@borisno2
Copy link
Member

Great, I'll close this issue now then. Thanks for letting us know

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Unresolved bug dependencies Related to our dependencies
Projects
None yet
Development

No branches or pull requests

4 participants