import * as __ from 'lodash'
import deepdash from 'deepdash-es'
const _ = deepdash(__)
I get the following error:
5: import * as __ from 'lodash'
6: import deepdash from 'deepdash-es'
7: const _ = deepdash(__)
Error [ERR_REQUIRE_ESM]: Must use import to load ES Module: /home/vedantroy/Desktop/clay/url-type-service/node_modules/deepdash-es/deepdash.js
require() of ES modules is not supported.
require() of /home/vedantroy/Desktop/clay/url-type-service/node_modules/deepdash-es/deepdash.js from /home/vedantroy/Desktop/clay/url-type-service/integration-tests/integration.lite.test.ts 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 deepdash.js to end in .cjs, change the requiring code to use import(), or remove "type": "module" from /home/vedantroy/Desktop/clay/url-type-service/node_modules/deepdash-es/package.json.
When doing:
I get the following error: