Getting error after updating to latest version
OmerWow opened this issue · comments
Seems like it's related to the new use of modules:
Error [ERR_REQUIRE_ESM]: Must use import to load ES Module: /Users//Documents/GitHub//app/node_modules/d3-geo/node_modules/d3-array/src/index.js
require() of ES modules is not supported.
require() of /Users//Documents/GitHub//app/node_modules/d3-geo/node_modules/d3-array/src/index.js from /Users//Documents/GitHub//app/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.
Instead rename index.js to end in .cjs, change the requiring code to use import(), or remove "type": "module" from /Users//Documents/GitHub//app/node_modules/d3-geo/node_modules/d3-array/package.json.
Yes. See the link at https://github.com/d3/d3-geo/releases/tag/v3.0.0 for more details.