tsed: Failed to run command
Describe the bug
I installed fresh tsed project on 8.5.0, when i tried to run default HelloCommand it gave me error
npx tsed run hello-command
/Users/utopia/myprojects/backend-api-v8/node_modules/@tsed/cli/node_modules/@tsed/cli-core/lib/cjs/index.js:7
tslib_1.__exportStar(require("@tsed/core"), exports);
^
Error [ERR_REQUIRE_ESM]: require() of ES Module /Users/utopia/myprojects/backend-api-v8/node_modules/@tsed/core/lib/esm/index.js from /Users/utopia/myprojects/backend-api-v8/node_modules/@tsed/cli/node_modules/@tsed/cli-core/lib/cjs/index.js not supported.
Instead change the require of /Users/utopia/myprojects/backend-api-v8/node_modules/@tsed/core/lib/esm/index.js in /Users/utopia/myprojects/backend-api-v8/node_modules/@tsed/cli/node_modules/@tsed/cli-core/lib/cjs/index.js to a dynamic import() which is available in all CommonJS modules.
at Object.<anonymous> (/Users/utopia/myprojects/backend-api-v8/node_modules/@tsed/cli/node_modules/@tsed/cli-core/lib/cjs/index.js:7:22) {
code: 'ERR_REQUIRE_ESM'
}
Node.js v20.17.0
To Reproduce
just run default HelloCommand
Expected behavior
it should not fail, i suspect this happens due to incompatibile cjs package @tsed/core
Code snippets
Repository URL example
No response
OS
macos
Node version
node 20.17.0
Library version
8.5.0
Additional context
No response
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 15
closing this, as always, you are great!!