Skip to content
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

🐛 Bug: CJS build of v2.1.1 imports an ESM-only module #151

Closed
3 tasks done
askoufis opened this issue Nov 20, 2023 · 1 comment · Fixed by #154
Closed
3 tasks done

🐛 Bug: CJS build of v2.1.1 imports an ESM-only module #151

askoufis opened this issue Nov 20, 2023 · 1 comment · Fixed by #154
Assignees
Labels
status: accepting prs Please, send a pull request to resolve this! type: bug Something isn't working :(

Comments

@askoufis
Copy link
Contributor

askoufis commented Nov 20, 2023

Bug Report Checklist

  • I have tried restarting my IDE and the issue persists.
  • I have pulled the latest main branch of the repository.
  • I have searched for related issues and found none that matched my issue.

Expected

Importing the CJS build should work correctly.

Actual

A node error is thrown:

Error [ERR_REQUIRE_ESM]: require() of ES Module /workdir/node_modules/node-emoji/node_modules/@sindresorhus/is/dist/index.js from /workdir/node_modules/node-emoji/lib/index.cjs not supported.

Additional Info

@sindresorhus/is went ESM-only in v5, making it incompatible in a CJS build without some kind CJS-transpilation in place (don't think this is the case with this library).

The upgrade to @sindresorhus/is@6 was done here.

It appears as though this has been an issue in the past.

@askoufis askoufis added the type: bug Something isn't working :( label Nov 20, 2023
@JoshuaKGoldberg JoshuaKGoldberg added the status: accepting prs Please, send a pull request to resolve this! label Nov 20, 2023
@JoshuaKGoldberg
Copy link
Collaborator

Blurgh, I forgot about ESM-only for sindre's packages. Will take another look and try to lock back down to the older version. Thanks for filing!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: accepting prs Please, send a pull request to resolve this! type: bug Something isn't working :(
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants