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

Unable to detect the module format for yargs #5

Open
Delapouite opened this issue Jul 15, 2022 · 0 comments
Open

Unable to detect the module format for yargs #5

Delapouite opened this issue Jul 15, 2022 · 0 comments

Comments

@Delapouite
Copy link

Hello

My initial attempt was to try npx is-esm yargs. It was my first reflex because I knew that this library had made the transition to ESM as detailed in their blog post from 2020: https://yargs.js.org/2020/09/07/yargs-16.html

Unfortunately it failed with a Unable to detect the module format. As the caught error is silenced, I don't know yet what's happening.

By inspecting the package.json of yargs, we can get a few clues that ESM is supported because there's an exports object with definition pointing to .mjs file. https://github.com/yargs/yargs/blob/main/package.json

So maybe is-esm could fallback on this kind of heuristics in case the rollup method does not work as intended?

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant