akveo / akveo/ngx-admin-bundle-support

NestJS Nest can't resolve dependencies of the UserService (?, SettingsService).

Aperta
#45 1 commento 1 reazione 0 assegnatari Vedi su GitHub
Lingua principale
TypeScript
Stelle
56
Fork
30
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

When you start the APP this is the error you get, also testing with e2e will give the error too.

```
$ jest --config ./test/jest-e2e.json
FAIL test/app.e2e-spec.ts (10.787s)
AppController (e2e)
× / (GET) (252ms)

● AppController (e2e) › / (GET)

Nest can't resolve dependencies of the UserService (?, SettingsService). Please make sure that the argument UserModel at index [0] is available in the AuthModule context.

Potential solutions:
- If UserModel is a provider, is it part of the current AuthModule?
- If UserModel is exported from a separate @Module, is that module imported within AuthModule?
@Module({
imports: [ /* the Module containing UserModel */ ]
})

at Injector.lookupComponentInExports (../node_modules/@nestjs/core/injector/injector.js:185:19)
at Injector.resolveComponentInstance (../node_modules/@nestjs/core/injector/injector.js:142:33)
at resolveParam (../node_modules/@nestjs/core/injector/injector.js:96:38)
at async Promise.all (index 0)
at Injector.resolveConstructorParams (../node_modules/@nestjs/core/injector/injector.js:111:27)
at Injector.loadInstance (../node_modules/@nestjs/core/injector/injector.js:78:9)
at Injector.loadProvider (../node_modules/@nestjs/core/injector/injector.js:35:9)
at async Promise.all (index 6)
at InstanceLoader.createInstancesOfProviders (../node_modules/@nestjs/core/injector/instance-loader.js:41:9)
at ../node_modules/@nestjs/core/injector/instance-loader.js:27:13
at async Promise.all (index 3)
at InstanceLoader.createInstances (../node_modules/@nestjs/core/injector/instance-loader.js:26:9)
at InstanceLoader.createInstancesOfDependencies (../node_modules/@nestjs/core/injector/instance-loader.js:16:9)
at TestingModuleBuilder.compile (../node_modules/@nestjs/testing/testing-module.builder.js:38:9)

● AppController (e2e) › / (GET) TypeError: Cannot read property 'getHttpServer' of undefined 22 | 23 | it('/ (GET)', () => { > 24 | return request(app.getHttpServer()) | ^ 25 | .get('/') 26 | .expect(200) 27 | .expect('Hello World!'); at Object. (app.e2e-spec.ts:24:24)
```

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.