-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Description
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
from6.3.1
to the first release candidate0.0.0-rc-20250210004303
- Upgrade
@keystone-6/fields-document
from9.1.1
to the same release candidate0.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