My Nest App depends on a few custom ES Module libraries that I wrote. However, when I run my app, it is saying Error [ERR_REQUIRE_ESM]: Must use import to load ES Module: /Users/patrickluy/Documents/Business/Perivel/Products/perivel.com/node_modules/@swindle/core/dist/index.js require() of ES modules is not supported.
So far, I have tried setting "type": "module" in my package.json file. But, that didn't work. How do I fix this error?