Search code examples
nestjstypeorm

NestJS/Typeorm ormconfig.json is not being used


I was just using typeorm with NestJS as usual. But it installed version 8.1.4 instead of my previously used 8.0.3. With the newer version I couldn't get the ormconfig.json working. I then checked and installed 8.0.3 and it worked again. I have also tried with 9.0.0 and I couldn't get it to work their either. Does somebody else has the same issue and maybe a temporary fix? Thanks!


Solution

  • With @nestjs/[email protected] and on typeorm@^.3.0 is used, which doesn't use the ormconfig.json. You'd need to update your code to make the ormconfig work (i.e. get rid of it and follow the 0.3.0 format).