Error [ERR_REQUIRE_ESM]: Must use import to load ES Module: /home/globant/Documents/repos/spybee/node_modules/mongoose-softdelete/src/mongoose-softdelete.js
require() of ES modules is not supported.
require() of /home/globant/Documents/repos/spybee/node_modules/mongoose-softdelete/src/mongoose-softdelete.js from /home/globant/Documents/repos/spybee/src/models/user.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 mongoose-softdelete.js to end in .cjs, change the requiring code to use import(), or remove "type": "module" from /home/globant/Documents/repos/spybee/node_modules/mongoose-softdelete/package.json.
Hi im trying to use soft delete with typescript
Package.json