-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
no-cycle
breaks when my files import node_module index.es.js
files from fortawesome
#1717
Comments
https://unpkg.com/@fortawesome/fontawesome-svg-core@1.2.28/index.es.js is invalid, because In this case, that package is broken, because it published what should be CJS, as raw ESM. I believe you can add that package to the |
Thanks. I'm going to open a ticket with them and try the setting now. |
Thanks, please post the link here when you do so I can subscribe :-) |
@ljharb can you help me understand this a little better? The
What am I missing? Can you point me to some spec or official doc that outlines the rules? |
Right, but .js files in node_modules can only use CJS, not ESM - ie, |
@ljharb any official source doc? We're happy to make changes but I need a reference. |
node’s official docs for .js vs .mjs, but no, there’s no official doc for “js files should always be transpiled on prepublish into CJS”, that’s just the overwhelming community convention for a decade. |
Thanks @ljharb |
This is a totally wacky one. The files throwing errors below are imported by two of my js files. And for some reason, they're getting parsed, even though no other files in node_modules are. Of course, I'm in a monorepo, which might confound things a bit:
The import statements are nothing special:
And these are the errors:
The errors go away when I disable
no-cycle
. Thanks again for the help!The text was updated successfully, but these errors were encountered: