You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When I try to update TypeScript version > 4.1.5, (specifically I tried 4.9.5) I see this error:
gordon_server_1 |
gordon_server_1 | Error [ERR_UNSUPPORTED_DIR_IMPORT]: Directory import '/user/src/app/dist/config' is not supported resolving ES modules imported from /user/src/app/dist/src/server.js
gordon_server_1 | at new NodeError (node:internal/errors:405:5)
gordon_server_1 | at finalizeResolution (node:internal/modules/esm/resolve:218:17)
gordon_server_1 | at moduleResolve (node:internal/modules/esm/resolve:838:10)
gordon_server_1 | at defaultResolve (node:internal/modules/esm/resolve:1036:11)
gordon_server_1 | at DefaultModuleLoader.resolve (node:internal/modules/esm/loader:251:12)
gordon_server_1 | at DefaultModuleLoader.getModuleJob (node:internal/modules/esm/loader:140:32)
gordon_server_1 | at ModuleWrap.<anonymous> (node:internal/modules/esm/module_job:76:33)
gordon_server_1 | at link (node:internal/modules/esm/module_job:75:36) {
gordon_server_1 | code: 'ERR_UNSUPPORTED_DIR_IMPORT',
gordon_server_1 | url: 'file:///user/src/app/dist/config'
gordon_server_1 | }
gordon_server_1 |
gordon_server_1 | Node.js v20.5.1
My project used "type": "module" in package.json and I use .cjs files for the configurations.
This issue is holding me back from major updates to other dependencies, any help to figure this out would be much appreciated.
Expected behavior
I expect everything to continue to work after the TS version update.
Please tell us about your environment:
node-config version: 3.3.9
node-version: 20.5.1
Other information
When I run in dev mode using ts-node, it works. But after TS transpile to js, it doesn't work.
The text was updated successfully, but these errors were encountered:
shaniqwa
changed the title
Project breaks after updating ts version + using .cjs config files
Project breaks after updating ts version (using .cjs config files)
Dec 27, 2023
Describe the bug
When I try to update TypeScript version > 4.1.5, (specifically I tried 4.9.5) I see this error:
My project used
"type": "module"
in package.json and I use.cjs
files for the configurations.This issue is holding me back from major updates to other dependencies, any help to figure this out would be much appreciated.
Expected behavior
I expect everything to continue to work after the TS version update.
Please tell us about your environment:
Other information
When I run in dev mode using ts-node, it works. But after TS transpile to js, it doesn't work.
The text was updated successfully, but these errors were encountered: