Guys I m stuck Anybody…

less than 1 minute read

Guys, I’m stuck. Anybody use migrations in nestjs projects ? I can’t get generation working from my entites ? Is there public reference project on github that works ? I spent few hours to find one with no success.


Solved it with next steps in package.json "migration:create": "ts-node -O '{\"module\": \"commonjs\"}' node_modules/typeorm/cli.js migration:create", "migration:generate": "ts-node -O '{\"module\": \"commonjs\"}' node_modules/typeorm/cli.js migration:generate", "migration:show": "ts-node -O '{\"module\": \"commonjs\"}' node_modules/typeorm/cli.js migration:show", "migration:run": "ts-node -O '{\"module\": \"commonjs\"}' node_modules/typeorm/cli.js migration:run -t=false", "migration:revert": "ts-node -O '{\"module\": \"commonjs\"}' node_modules/typeorm/cli.js migration:revert"