While I really hope that Nest.js eventually succeeds and provides a reliable framework to write maintainable web applications, my experience with it has been, in a word, frustrating. I find the integration with remaining ecosystem (testing, databases, etc.) quite poor.
For context, these are my experiences from the last few months of using Nest.js in a project we're working on at my company.
- It strongly encourages you to use TypeORM, which is just not production ready and has many (sometimes subtle) issues [1]
- Logging is often extremely bad. I've encountered issues where I made a mistake in my app bootstrapping code and there were no errors logged, but the application simply didn't start. Then I had to play a very frustrating game of commenting out pieces of code until the application would start again
- Nest.js error classes (HttpException and those that inherit from it, such as BadRequestException) do not properly inherit from built-in Error, which means that when your tests fail, the only output you'll get is "Error: [Object object]" printed to the console without a proper stack trace.
- We used their GraphQL module and when we tried to send a few MB of data to the client for initial state, memory usage would balloon to hundreds(!) of megabytes from a single request.
- Misconfiguring any part of GraphQL would again lead to an error being thrown somewhere inside their libraries, with a message like "Cannot read propery 'target' of undefined" with no stack trace or any indication of where the problem might be
- Documentation is lacking and doesn't do a proper job of documenting the features. Usually it's just a hello-world style example without much depth
That's just my experience, maybe I was just "using it wrong". But it was definitely far from a smooth experience and lead me to waste countless hours trying to track down and fix obscure issues.
If you're thinking about using Nest.js, I would recommend that you ditch TypeORM and use something else, I also wouldn't recommend using GraphQL with Nest.
[1] https://github.com/typeorm/typeorm/issues/2065