-
-
Notifications
You must be signed in to change notification settings - Fork 3
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
require() of ES Module prettier-plugin-curlylib/index.js is not supported #545
Comments
Works on my machine. Could you please post an isolated reproduction where I can reproduce your issues? |
I had this same error just now after setting up Storybook on my Nextjs project. Reverting to ^0.1.3 stops the error from happening. |
@markof94 prove it! 🙂 (please) |
Super, thanks - I can repro with that! Much appreciated! The root issue is roughly what Prettier is hinting: that In other words, roughly https://github.com/JoshuaKGoldberg/create-typescript-app/blob/0a4c50f93c690af12356a9c99a7079ecb6da3a6f/docs/FAQs.md#how-can-i-add-dual-commonjs--ecmascript-modules-emit is needed. I'll do that real quick now. Thanks all! |
@all-contributors please add @Tawpie for bug.
|
I've put up a pull request to add @Tawpie! 🎉 I couldn't determine any contributions to add, did you specify any contributions? |
👋 this should be fixed in |
Bug Report Checklist
main
branch of the repository.Expected
Plugin should run without error
Actual
Error [ERR_REQUIRE_ESM]: require() of ES Module [redacted]/node_modules/prettier-plugin-curly/lib/index.js from [redacted]/node_modules/prettier/index.js not supported.
Instead change the require of [redacted]/node_modules/prettier-plugin-curly/lib/index.js in [redacted]/node_modules/prettier/index.js to a dynamic import() which is available in all CommonJS modules.
at c._load (node:electron/js2c/node_init:2:13672)
Additional Info
happens with node 18.18.0 and 20.15.0
The text was updated successfully, but these errors were encountered: