ReferenceError: Cannot access 'ManagementError' before initialization
Les mainteneurs répondent en général sous 1 jour
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 3/5
- Temps estimé
- 1-2 jours
- Accessibilité débutants
- 70/100
- Type d'issue
- Bug
- Clarté
- Clairement spécifiée
- Activité
- Active
- Stack technique
- node.js, typescript
Piste de recherche
Start with the generated ManagementTimeoutError.ts and the errors barrel it imports, then check how Fern generates this file and how the ESM build is produced. Reproduce the import failure without creating an Auth0 client or making a network request. Done when the generated error imports ManagementError directly, the cycle is removed, and importing the ESM build succeeds while public exports remain intact.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
Checklist
- I have looked into the Readme, Examples, and FAQ 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
ESM import can access ManagementError before initialization
Summary
Importing the ESM build can fail during module initialization with:
ReferenceError: Cannot access 'ManagementError' before initialization
at .../auth0/dist/esm/management/errors/ManagementTimeoutError.mjs:3:52
The failure occurs before an Auth0 client is instantiated or a network request is made, so no Auth0 credentials are required to investigate it.
Suspected cause
ManagementTimeoutError imports the errors barrel and extends its ManagementError export:
import * as errors from "./index.js";
export class ManagementTimeoutError extends errors.ManagementError {}
The barrel also exports ManagementTimeoutError, producing this cycle:
ManagementTimeoutError -> errors/index -> ManagementTimeoutError
Proposed generator change
Generate a direct dependency on the base error instead:
import { ManagementError } from "./ManagementError.js";
export class ManagementTimeoutError extends ManagementError {}
This removes the error module's barrel cycle while preserving the package's public exports.
Notes for maintainers
ManagementTimeoutError.ts is generated by Fern so I didn't create a PR in this repo for it, not sure how that is typically handled.
Reproduction
I ran into this with a simple import in an ESM project -- happy to create a repro repository if needed.
Additional context
No response
node-auth0 version
7.6.0
Node.js version
26.12
- Langage dominant
- TypeScript
- Étoiles
- 683
- Forks
- 319
- Merge moyen
- 1 j 30 min
- PR mergées (30 j)
- 13
Préparer son environnement
- Aucun Dockerfile ni fichier Docker Compose
- Propose un modèle de pull request
- Lire le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de auth0/node-auth0
-
createManagementAuth drops the custom fetch option from clientOptionsPeut-être pris @RaphaelFakhri l’a pris il y a 28 jours. Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 77/100
auth0/node-auth0#1432 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 3/5 1-2 jours Accessibilité débutants 52/100
auth0/node-auth0#1387 · 1 commentaire · 2 réactions ·
Les mainteneurs répondent en général sous 1 jour
-
bug
Difficulté 5/5 Plus d'une semaine Accessibilité débutants 35/100
auth0/node-auth0#1295 · 2 commentaires ·
Les mainteneurs répondent en général sous 1 jour
-
V5 Nullability seems... wrong?Ouverte
Difficulté 4/5 3-5 jours Accessibilité débutants 48/100
auth0/node-auth0#1204 · 11 commentaires · 7 réactions ·
Les mainteneurs répondent en général sous 1 jour
-
bug vNext
Difficulté 3/5 Une demi-journée Accessibilité débutants 38/100
auth0/node-auth0#1106 · 3 commentaires · 1 réaction ·
Les mainteneurs répondent en général sous 1 jour
Toutes les issues de auth0/node-auth0
Issues similaires
-
Difficulté 2/5 1-3 heures Accessibilité débutants 75/100
milind-soni/OpenMausBot#6730 ·
Les mainteneurs répondent en général sous 1 jour
-
`@angular/[email protected]` depends on vulnerable Vite 7.3.7 - GHSA-p4f5-76q4-ffq7 (Critical RCE)Ouvertearea: @angular/build
Difficulté 2/5 1-3 heures Accessibilité débutants 65/100
angular/angular-cli#34764 ·
Les mainteneurs répondent en général sous 1 jour
-
status/need-triage
Difficulté 2/5 1-3 heures Accessibilité débutants 76/100
google-gemini/gemini-cli#30384 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour
-
P2
Difficulté 1/5 Moins d'une heure Accessibilité débutants 84/100
Les mainteneurs répondent en général sous 1 jour
-
area:image documentation good first issue
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100
Les mainteneurs répondent en général sous 1 jour