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
I have an issue using NestJS + TypeORM with migration.
I use NestJS as a monorepo. I have my public api, batch for scheduled process. And I have 2 libs : config and database.
In database, there are the entities and the migrations. When I want to start the API, the entities are "compiled" into the dist folder, but not the migration.
PS : webpack is not used here.
With npm run build I have :
But, when I run npm run build database :
I don't understand why the migration are compiled with database but not with the api ..
Thank you for taking the time to submit your report! From the looks of it, this could be better discussed on our Discord. If you haven't already, please join here and send a new post in the # 🐈 nestjs-help forum. Make sure to include a link to this issue, so you don't need to write it all again. We have a large community of helpful members, who will assist you in getting this to work.
Is there an existing issue for this?
Current behavior
Hi !
I have an issue using NestJS + TypeORM with migration.
I use NestJS as a monorepo. I have my public api, batch for scheduled process. And I have 2 libs : config and database.
In database, there are the entities and the migrations. When I want to start the API, the entities are "compiled" into the dist folder, but not the migration.
PS : webpack is not used here.
With
npm run build
I have :But, when I run
npm run build database
:I don't understand why the migration are compiled with database but not with the api ..
Minimum reproduction code
https://github.com/asijoumi/nest-issue-typeorm
Steps to reproduce
Expected behavior
We should have migration .js files in dist folder.
Package
@nestjs/common
@nestjs/core
@nestjs/microservices
@nestjs/platform-express
@nestjs/platform-fastify
@nestjs/platform-socket.io
@nestjs/platform-ws
@nestjs/testing
@nestjs/websockets
Other package
@nestjs/typeorm
NestJS version
10.0.0
Packages versions
Node.js version
18.19.0
In which operating systems have you tested?
Other
No response
The text was updated successfully, but these errors were encountered: