Closed erikash closed 3 years ago
I've started a project using the typescript-starter
and didn't encounter this issue.
Same issue here with babel... any update?
Please, provide a minimal repository which reproduces your issue.
@kamilmysliwiec please take a look on this repo: https://github.com/sebas-deedee/project-mercury-api
This repo only have the code example for authentication and the mentioned problem.
Any update @kamilmysliwiec ?
Nestjs no longer supports JS. TS only Please correct the support information on the official website
@erikash @kamilmysliwiec @sebas-deedee, I found temporary solution: In .babelrc
(or babel.config.js (or .json)) need to change "presets": ["@babel/preset-env"]
to "presets": [["@babel/preset-env", { "targets": { "node": "current" } }]]
The point is that JS, unlike TS, does not perceive "compilerOptions", which leads to an attempt of interaction between ES5 and ES6 code
Hi, I'm running into the exact same error but my project was set up differently so not sure if relevant but I'm hoping there is a workaround.
I set up a NativeScript shared project with Angular and then used the NextJS schematic to convert the project into an Angular Universal project. After adding the passport
dependency and a local strategy described in the docs I ran into this error.
My tsconfig.json
shows the target
is set to es5
and changing it to es6
or others seems to cause other compilation issues. Not even sure if NativeScript/Angular is compatible with NextJS though. Any tips would be much appreciated 🙏
Bug Report
I've started a new Node.js project and followed the passport authentication tutorial until: https://docs.nestjs.com/techniques/authentication#jwt-functionality
Current behavior
Expected behavior
Applications should start.
Environment
My
jsconfig.json
file (I'v changed toesnext
as suggested by https://github.com/nestjs/passport/issues/27:I've also edited
local.strategy.js
, i've switched thesuper();
andthis.authService = authService;
lines as I was getting an error:TypeError: Cannot set property 'authService' of undefined
local.strategy.js