Search code examples
nestjstypeormserverless

Serverless Lambda with NestJS + Typeorm


I try to run serverless offline with NestJS + Typeorm. First time I call to get all users, it worked. But second time, I got an error:

ERROR [ExceptionHandler] No repository for "User" was found. Looks like this entity is not registered in current "default" connection?

I added keepConnectionAlive: true but it doesn't work. Please help me, thank you!


Solution

  • Try --allowCache option.

    I'd got exactly same issue with you

    This command worked for me.

    npx sls offline --allowCache start