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
Can't we execute the script without it defaulting to use the .ts files?
i.e. when I do something like node ./node_modules/typeorm-extension/bin/cli.cjs seed:run -d ./dist/ormconfig.js
It always tries to read paths of the ormconfig.ts (note ts instead of js) which results in Cannot find module 'src/datasources/postgres.datasource' due to absolute paths not being registered.
The only workaround to this is deleting source files (e.g. while building a docker image), or renaming ormconfig.ts to something else. Which makes it work properly i.e. it doesn't need ts-node to work.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
I hope this message finds you fine.
Can't we execute the script without it defaulting to use the
.ts
files?i.e. when I do something like
node ./node_modules/typeorm-extension/bin/cli.cjs seed:run -d ./dist/ormconfig.js
It always tries to read paths of the
ormconfig.ts
(note ts instead of js) which results inCannot find module 'src/datasources/postgres.datasource'
due to absolute paths not being registered.The only workaround to this is deleting source files (e.g. while building a docker image), or renaming
ormconfig.ts
to something else. Which makes it work properly i.e. it doesn't need ts-node to work.Any help is appreciated!
Beta Was this translation helpful? Give feedback.
All reactions