Hi!, when I'm trying to import d3 force to default nestjs application the following error appears:
Error [ERR_REQUIRE_ESM]: Must use import to load ES Module: [path to local project]\node_modules\d3-force\src\index.js
require() of ES modules is not supported.
Import in code looks like this:
import { forceSimulation } from 'd3-force';
// or
import * as d3 from 'd3-force';
// or
import d3 from 'd3-force';
Hi!, when I'm trying to import
d3 force
to defaultnestjs
application the following error appears:Import in code looks like this:
You can reproduce error by cloning this minimal repository: https://github.com/bwmirek/nestjs-d3-force-import-bug Run following commands: