auth0/angular2-jwt

Package not working with es2022

morbargig opened this issue · 4 comments

Checklist

  • I have looked into the Readme and Examples, and have not found a suitable solution or answer.
  • I have looked into the API documentation and have not found a suitable solution or answer.
  • I have searched the issues and have not found a suitable solution or answer.
  • I have searched the Auth0 Community forums and have not found a suitable solution or answer.
  • I agree to the terms within the Auth0 Code of Conduct.

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

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 ?

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.

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

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