I wanted to update my keystone dependencies because the new version supports React 19. Thanks for the update by the way! 🥳
However, when I ran keystone build, I stumbled apon an error I can't seem to get rid of. I'd love your input if possible. Thanks in advance!
Steps to reproduce
- Upgrade
@keystone-6/core from 6.3.1 to the first release candidate 0.0.0-rc-20250210004303
- Upgrade
@keystone-6/fields-document from 9.1.1 to the same release candidate 0.0.0-rc-20250210004303
- run
pnpm keystone build (in my case: pnpm dotenv -- keystone build)
- All steps until "Compiled successfully" behave normally.
- Observe error: unhandledRejection Error [ERR_REQUIRE_ESM]: require() of ES Module /@keystar/ui/dist/keystar-ui-table.js from /admin-ui/pages/App/dist/keystone-6-core-___internal-do-not-use-will-break-in-patch-admin-ui-pages-App.cjs.js not supported.
It seems that the cli uses the cjs build of the @keystone/core package, which then attempts to import the esm-only @keystar/ui build.
The error does not occur when adding the --no-ui flag to the build command.
System details
- Linux mint
- Pnpm 9.3.0
- Node v22.11.0
I wanted to update my keystone dependencies because the new version supports React 19. Thanks for the update by the way! 🥳
However, when I ran
keystone build, I stumbled apon an error I can't seem to get rid of. I'd love your input if possible. Thanks in advance!Steps to reproduce
@keystone-6/corefrom6.3.1to the first release candidate0.0.0-rc-20250210004303@keystone-6/fields-documentfrom9.1.1to the same release candidate0.0.0-rc-20250210004303pnpm keystone build(in my case:pnpm dotenv -- keystone build)It seems that the cli uses the cjs build of the
@keystone/corepackage, which then attempts to import the esm-only@keystar/uibuild.The error does not occur when adding the
--no-uiflag to the build command.System details