#Unable to resolve injected dependency in service class via standalone application

3 messages · Page 1 of 1 (latest)

half quarry
#

https://docs.nestjs.com/standalone-applications

My use case is exactly this, only TasksService has an injected dependency (database). The application boots just fine, but if I create a standalone service and console.log taskService.database, it's undefined. Any ideas?

flint cave
#

How do you inject the database? Does the database depend on a REQUEST in any way?

half quarry
#

I decorated my TaskService with Injectable(); not @Injectable()