Hi, I'm using t3 stack and trying to leverage Next.js custom server. But, unfortunately when I'm trying to run it using
ts-node
ts-node
I'm constantly getting an error connected to module resolution (I guess it's because my
next.config.mjs
next.config.mjs
has
.mjs
.mjs
extension):
[1] Error [ERR_REQUIRE_ESM]: require() of ES Module next.config.mjs not supported.[1] Instead change the require of next.config.mjs to a dynamic import() which is available in all CommonJS modules.
[1] Error [ERR_REQUIRE_ESM]: require() of ES Module next.config.mjs not supported.[1] Instead change the require of next.config.mjs to a dynamic import() which is available in all CommonJS modules.