I'm starting with Nest.js and I'm getting an error after I create a service:
Nest can't resolve dependencies of the PhotoService (?). Please verify whether [0] argument is available in the current context.
I'm following the database example: https://docs.nestjs.com/techniques/database
Here is my full code: https://github.com/marceloHashzen/nestjsbasics
In your app.module.ts
remove PhotoService
from providers.
Then in PhotoModule
, just export PhotoService
:
@Module({
// ...prev code
exports: [PhotoService],
})
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With