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

Stuck on NPM module d3 5.16.0 and node engine 16.x until [ERR_REQUIRE_ESM]: Must use import to load ES Module is resolved #10

Open
jimmylee opened this issue Jun 5, 2021 · 0 comments
Assignees
Labels

Comments

@jimmylee
Copy link
Contributor

jimmylee commented Jun 5, 2021

manuelbieh/geolib#208

Prevents us from updating to the newer 6.x.x versions of https://www.npmjs.com/package/d3, this is a liability that isn't really a big deal now but keeping a careful watch.

> Build error occurred
Jun 5 01:47:33 PM  Error [ERR_REQUIRE_ESM]: Must use import to load ES Module: /opt/render/project/src/node_modules/d3-geo/node_modules/d3-array/src/index.js
Jun 5 01:47:33 PM  require() of ES modules is not supported.
Jun 5 01:47:33 PM  require() of /opt/render/project/src/node_modules/d3-geo/node_modules/d3-array/src/index.js from /opt/render/project/src/node_modules/d3-geo/dist/d3-geo.js is an ES module file as it is a .js file whose nearest parent package.json contains "type": "module" which defines all .js files in that package scope as ES modules.
Jun 5 01:47:33 PM  Instead rename index.js to end in .cjs, change the requiring code to use import(), or remove "type": "module" from /opt/render/project/src/node_modules/d3-geo/node_modules/d3-array/package.json.
Jun 5 01:47:33 PM  
Jun 5 01:47:33 PM      at new NodeError (node:internal/errors:363:5)
Jun 5 01:47:33 PM      at Object.Module._extensions..js (node:internal/modules/cjs/loader:1126:13)
Jun 5 01:47:33 PM      at Module.load (node:internal/modules/cjs/loader:989:32)
Jun 5 01:47:33 PM      at Function.Module._load (node:internal/modules/cjs/loader:829:14)
Jun 5 01:47:33 PM      at Module.require (node:internal/modules/cjs/loader:1013:19)
Jun 5 01:47:33 PM      at require (node:internal/modules/cjs/helpers:93:18)
Jun 5 01:47:33 PM      at /opt/render/project/src/node_modules/d3-geo/dist/d3-geo.js:3:81
Jun 5 01:47:33 PM      at Object.<anonymous> (/opt/render/project/src/node_modules/d3-geo/dist/d3-geo.js:6:2)
Jun 5 01:47:33 PM      at Module._compile (node:internal/modules/cjs/loader:1109:14)
Jun 5 01:47:33 PM      at Object.Module._extensions..js (node:internal/modules/cjs/loader:1138:10) {
Jun 5 01:47:33 PM    type: 'Error',
Jun 5 01:47:33 PM    code: 'ERR_REQUIRE_ESM'
Jun 5 01:47:33 PM  }
Jun 5 01:47:33 PM  error Command failed with exit code 1.
@jimmylee jimmylee added the bug label Jun 5, 2021
@jimmylee jimmylee self-assigned this Jun 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant