auth0 / angular2-jwt

Helper library for handling JWTs in Angular apps
MIT License
2.63k stars 485 forks source link

Package not working with es2022 #774

Closed morbargig closed 1 year ago

morbargig commented 1 year ago

Checklist

Description

after upgrade to angular 16 the tsconfig use set to es2022 and the package will fail on build and run the angular app.

Reproduction

  1. npm i
  2. npx nx run main-app:serve

Additional context

./node_modules/@auth0/angular-jwt/fesm2015/auth0-angular-jwt.js - Error: Module build failed (from ./node_modules/@angular-devkit/build-angular/src/tools/babel/webpack-loader.js): TypeError: /Users/morbargig/Desktop/Projects/ideo/Phoenix/B2B/Agentes/mono-repo/node_modules/@auth0/angular-jwt/fesm2015/auth0-angular-jwt.js: Cannot read properties of undefined (reading 'file')

angular-jwt version

^5.1.0

Angular version

16.1.3

Which browsers have you tested in?

Chrome

frederikprijck commented 1 year ago

I tried our package with angular 16, using ES2022 and it compiles and runs fine. Could you share a reproduction to try and determine what could be causing the issue ?

Thaelin commented 1 year ago

We started getting the same error since today on Angular 12.2 . I noticed this error in CI pipeline where npm i and npm build are executed in sequence. Locally I had to delete node_modules and package-lock.json and run npm i + npm build to reproduce issue.

frederikprijck commented 1 year ago

@Thaelin Not sure that's the same error. We do not support Angular12, see https://github.com/auth0/angular2-jwt#requirements.

frederikprijck commented 1 year ago

@morbargig Closing this due to inactivity. Happy to reopen if you can provide something to reproduce.