medium-nest-typeorm-postgres-sample
medium-nest-typeorm-postgres-sample copied to clipboard
How I can create migrations with this realisation?
I`m trying to create migration by TypeORM CLI
npm run typeorm -- -d ./dist/shared/typeorm/typeorm.service.js migration:generate ./src/shared/typeorm/migrations/$npm_config_name
but have an error:
`Error during migration generation: Error: Unable to open file: "/Users/admin/Desktop/sample/dist/shared/typeorm/typeorm.service.ts". Cannot find module '/Users/admin/Desktop/sample/dist/shared/typeorm/typeorm.service.ts' Require stack:
- /Users/admin/Desktop/sample/node_modules/typeorm/util/ImportUtils.js
- /Users/admin/Desktop/sample/node_modules/typeorm/commands/CommandUtils.js
- /Users/admin/Desktop/sample/node_modules/typeorm/commands/SchemaSyncCommand.js
- /Users/admin/Desktop/sample/node_modules/typeorm/cli.js at Function.loadDataSource (/Users/admin/Desktop/sample/node_modules/src/commands/CommandUtils.ts:22:19) at async Object.handler (/Users/admin/Desktop/sample/node_modules/src/commands/MigrationGenerateCommand.ts:73:26)`