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

Getting ES Module errors all of a sudden #182

Open
jwld opened this issue Nov 28, 2024 · 2 comments
Open

Getting ES Module errors all of a sudden #182

jwld opened this issue Nov 28, 2024 · 2 comments

Comments

@jwld
Copy link

jwld commented Nov 28, 2024

Encountered after I deleted yarn.lock and did a fresh install on my project.

Error [ERR_REQUIRE_ESM]: require() of ES Module blah/node_modules/point-in-polygon-hao/dist/pointInPolygon.mjs not supported.
Instead change the require of blah/node_modules/point-in-polygon-hao/dist/pointInPolygon.mjs to a dynamic import() which is available in all CommonJS modules.
    at Object.<anonymous> (blah/node_modules/@turf/boolean-point-in-polygon/dist/cjs/index.cjs:2:26)
    at Object.<anonymous> (blah/node_modules/geo-tz/dist/find-1970.js:1:61)

Looks like https://github.com/rowanwins/point-in-polygon-hao was updated a few hours ago which has busted this.

@oliver-youdooh
Copy link

Our team is getting this issue too. Will try to find a workaround and let you know.

@oliver-youdooh
Copy link

oliver-youdooh commented Nov 29, 2024

@jwld we managed to fix this temporarily by adding below into our package.json

"overrides": {  
    "point-in-polygon-hao": "1.0.0"  
  }

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