ReferenceError: Cannot access 'ManagementError' before initialization
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 70/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- node.js, typescript
調査の方向性
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.
索引モデルが issue の本文から書いたものです。
説明
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
- 主要言語
- TypeScript
- スター
- 683
- フォーク
- 319
- 平均マージ
- 1日 30分
- マージ済み PR(30日)
- 13
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
auth0/node-auth0 のほかの issue
-
createManagementAuth drops the custom fetch option from clientOptions対応中かも @RaphaelFakhri が 28 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
auth0/node-auth0#1432 ·
メンテナーはふだん 1 日以内に返信
-
難易度 3/5 1〜2日 初心者へのやさしさ 52/100
auth0/node-auth0#1387 · コメント 1 件 · リアクション 2 件 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
auth0/node-auth0#1295 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
auth0/node-auth0#1204 · コメント 11 件 · リアクション 7 件 ·
メンテナーはふだん 1 日以内に返信
-
bug vNext
難易度 3/5 半日 初心者へのやさしさ 38/100
auth0/node-auth0#1106 · コメント 3 件 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
auth0/node-auth0 の issue をすべて見る
似ている issue
-
`@angular/[email protected]` depends on vulnerable Vite 7.3.7 - GHSA-p4f5-76q4-ffq7 (Critical RCE)オープンarea: @angular/build
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
angular/angular-cli#34764 ·
メンテナーはふだん 1 日以内に返信
-
status/need-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
google-gemini/gemini-cli#30384 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
P2
難易度 1/5 1時間未満 初心者へのやさしさ 84/100
メンテナーはふだん 1 日以内に返信
-
bug ready-for-human
難易度 2/5 1〜3時間 初心者へのやさしさ 60/100
LucasSantana-Dev/Lucky#3150 ·
メンテナーはふだん 1 日以内に返信
-
enhancement good first issue priority: low size: XS
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
メンテナーはふだん 1 日以内に返信