ReferenceError: Cannot access 'ManagementError' before initialization
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 70/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- node.js, typescript
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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
- Lingua principale
- TypeScript
- Stelle
- 683
- Fork
- 319
- Merge medio
- 1g 30m
- PR unite (30g)
- 13
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di auth0/node-auth0
-
createManagementAuth drops the custom fetch option from clientOptionsForse già presa @RaphaelFakhri l’ha presa 28 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 77/100
auth0/node-auth0#1432 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 52/100
auth0/node-auth0#1387 · 1 commento · 2 reazioni ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
auth0/node-auth0#1295 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
auth0/node-auth0#1204 · 11 commenti · 7 reazioni ·
I maintainer di solito rispondono entro 1 giorno
-
bug vNext
Difficoltà 3/5 Mezza giornata Idoneità per principianti 38/100
auth0/node-auth0#1106 · 3 commenti · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di auth0/node-auth0
Issue simili
-
`@angular/[email protected]` depends on vulnerable Vite 7.3.7 - GHSA-p4f5-76q4-ffq7 (Critical RCE)Apertaarea: @angular/build
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
angular/angular-cli#34764 ·
I maintainer di solito rispondono entro 1 giorno
-
status/need-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
google-gemini/gemini-cli#30384 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
P2
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 84/100
I maintainer di solito rispondono entro 1 giorno
-
bug ready-for-human
Difficoltà 2/5 1-3 ore Idoneità per principianti 60/100
LucasSantana-Dev/Lucky#3150 ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement good first issue priority: low size: XS
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
I maintainer di solito rispondono entro 1 giorno