-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
[ERR_REQUIRE_ESM]: require() of ES Module error on keystone build #9478
Comments
@quintal-william can you provide an example of the schema that produces this error for you? |
@quintal-william are you using Node 22 with |
Thanks for the quick reply! I figured out a from-scratch error repro:
|
I'm using Node v22.11.0, I don't know what you mean by " |
@quintal-william try |
That worked like a charm! Thanks so much for picking this up so quickly 😃😃 |
And thank you for testing a release candidate build! 💛 |
this is still a problem.
you will be greeted with the ERR_REQUIRE_ESM error complaining about the |
That is separate to this issue. That specific example due to the way it's written needs a version of Node.js that has |
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/core
from6.3.1
to the first release candidate0.0.0-rc-20250210004303
@keystone-6/fields-document
from9.1.1
to the same release candidate0.0.0-rc-20250210004303
pnpm keystone build
(in my case:pnpm dotenv -- keystone build
)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
The text was updated successfully, but these errors were encountered: