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

Cannot utilize require, only import. #16

Closed
CameronMunroe opened this issue Feb 23, 2023 · 2 comments
Closed

Cannot utilize require, only import. #16

CameronMunroe opened this issue Feb 23, 2023 · 2 comments

Comments

@CameronMunroe
Copy link

It would be nice if the package supported the older require() standard as well as the newer import().

Caught exception:  Error [ERR_REQUIRE_ESM]: require() of ES Module {...}/node_modules/is-ip/index.js from {...}/src/apiv1.js not supported.
Instead change the require of index.js in {...}/src/apiv1.js to a dynamic import() which is available in all CommonJS modules.
    at Object.<anonymous> (/{...}/src/apiv1.js:15:14)
    at Object.<anonymous> (/{...}/index.js:48:19) {
  code: 'ERR_REQUIRE_ESM'

Current workaround for anyone with issues is to force release to 3.1.0.

@sindresorhus
Copy link
Owner

@sindresorhus sindresorhus closed this as not planned Won't fix, can't repro, duplicate, stale Feb 23, 2023
@sindresorhus
Copy link
Owner

No plans to support CommonJS.

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

2 participants