Комментарии:
For those getting error:
nest can't resolve dependencies of the JWT_MODULE_OPTIONS (?). Please make sure that the argument ConfigService at index [0] is available in the JwtModule context.
solution:
add
imports: [ConfigModule], inside JWTModule.RegisterAsync
Thank you.
The fourth one is great too!
ОтветитьThanks Sir, you save my life,
But any of my class-validator is not working, I use class-validator in dto as you did
Is there is something that I miss?
Error: Nest can't resolve dependencies of the JWT_MODULE_OPTIONS (?). Please make sure that the argument ConfigService at index [0] is available in the JwtModule context.
Potential solutions:
- Is JwtModule a valid NestJS module?
- If ConfigService is a provider, is it part of the current JwtModule?
- If ConfigService is exported from a separate @Module, is that module imported within JwtModule?
@Module({
imports: [ /* the Module containing ConfigService */ ]
})
at Injector.lookupComponentInParentModules (E:\bytescrum\react\backend\node_modules\@nestjs\core\injector\injector.js:248:19)
at Injector.resolveComponentInstance (E:\bytescrum\react\backend\node_modules\@nestjs\core\injector\injector.js:202:33)
at resolveParam (E:\bytescrum\react\backend\node_modules\@nestjs\core\injector\injector.js:123:38)
at async Promise.all (index 0)
at Injector.resolveConstructorParams (E:\bytescrum\react\backend\node_modules\@nestjs\core\injector\injector.js:138:27)
at Injector.loadInstance (E:\bytescrum\react\backend\node_modules\@nestjs\core\injector\injector.js:64:13)
at Injector.loadProvider (E:\bytescrum\react\backend\node_modules\@nestjs\core\injector\injector.js:91:9)
at E:\bytescrum\react\backend\node_modules\@nestjs\core\injector\instance-loader.js:56:13
at async Promise.all (index 4)
at InstanceLoader.createInstancesOfProviders (E:\bytescrum\react\backend\node_modules\@nestjs\core\injector\instance-loader.js:55:9)
PS E:\bytescrum\react\backend> $ npm install --save @nestjs/jwt
$ : The term '$' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path
was included, verify that the path is correct and try again.
At line:1 char:1
+ $ npm install --save @nestjs/jwt
+ ~
+ CategoryInfo : ObjectNotFound: ($:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
PS E:\bytescrum\react\backend> npm install --save @nestjs/jwt
npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead.
[##################] | reify:fsevents: sill reify mark deleted [ 'E:\\bytescrum\\react\\backend\\node_modules\\fsevents' ]
thanks you so much
ОтветитьThanks for this video , also I want to know what all extra videos are there in your udemy course on nest js?
Ответитьthrowing error
ОтветитьsecretOrPrivateKey must have a value i am getting this error please help to resolve this
ОтветитьIt doesnt give me any errors if i write mail or password incorrect just instantly gives me token even if i send the inputs empty, and i cant see the users that created in mongo can you help me please?
Ответитьsir please can u tell me where are u import Jwt Service in auth.service.ts
ОтветитьI'm getting error:
Error: Nest can't resolve dependencies of the JWT_MODULE_OPTIONS (?). Please make sure that the argument ConfigService at index [0] is available in the JwtModule context.
I don't have .env file in my project . Is there any alternate solution
ОтветитьThank you sir
Ответитьsir,
latest version of mongoose is giving errors
how to make a swagger api for login and singup and in it use nestjs and mongodb please help me
Ответитьwhy have you created a get api for login it should be post
Ответить