loopbackio / loopbackio/loopback-next
Error when running `npm run tsdocs`
まだ誰も着手していません。
- 主要言語
- TypeScript
- スター
- 5.1k
- フォーク
- 1.1k
- 平均マージ
- 2日 21時間
- マージ済み PR(30日)
- 27
説明
### Describe the bug
Currently the release of loopback-next modules is blocked by the error when running the command `npm run tsdocs` as part of the release process.
Here is the error:
```
> @loopback/typeorm
Analysis will use the bundled TypeScript version 5.2.2
Error: Symbol not found for identifier: EventEmitter
at AstSymbolTable._analyzeChildTree (/SOME_PATH/loopback-next/node_modules/@microsoft/api-extractor/lib/analyzer/AstSymbolTable.js:293:39)
at AstSymbolTable._analyzeChildTree (/SOME_PATH/loopback-next/node_modules/@microsoft/api-extractor/lib/analyzer/AstSymbolTable.js:377:18)
at AstSymbolTable._analyzeChildTree (/SOME_PATH/loopback-next/node_modules/@microsoft/api-extractor/lib/analyzer/AstSymbolTable.js:377:18)
at AstSymbolTable._analyzeChildTree (/SOME_PATHloopback-next/node_modules/@microsoft/api-extractor/lib/analyzer/AstSymbolTable.js:377:18)
at AstSymbolTable._analyzeChildTree (/SOME_PATHloopback-next/node_modules/@microsoft/api-extractor/lib/analyzer/AstSymbolTable.js:377:18)
at AstSymbolTable._analyzeChildTree (/SOME_PATH/loopback-next/node_modules/@microsoft/api-extractor/lib/analyzer/AstSymbolTable.js:377:18)
at AstSymbolTable._analyzeChildTree (/SOME_PATH/loopback-next/node_modules/@microsoft/api-extractor/lib/analyzer/AstSymbolTable.js:377:18)
at AstSymbolTable._analyzeChildTree (/SOME_PATH/loopback-next/node_modules/@microsoft/api-extractor/lib/analyzer/AstSymbolTable.js:377:18)
at AstSymbolTable._analyzeChildTree (/SOME_PATH/loopback-next/node_modules/@microsoft/api-extractor/lib/analyzer/AstSymbolTable.js:377:18)
at AstSymbolTable._analyzeChildTree (/SOME_PATH/loopback-next/node_modules/@microsoft/api-extractor/lib/analyzer/AstSymbolTable.js:377:18)
at AstSymbolTable._analyzeAstSymbol (/SOME_PATH/loopback-next/node_modules/@microsoft/api-extractor/lib/analyzer/AstSymbolTable.js:247:18)
at AstSymbolTable.analyze (/SOME_PATH/loopback-next/node_modules/@microsoft/api-extractor/lib/analyzer/AstSymbolTable.js:113:25)
at /SOME_PATH/loopback-next/node_modules/@microsoft/api-extractor/lib/analyzer/ExportAnalyzer.js:247:62
at Map.forEach ()
at ExportAnalyzer._collectAllExportsRecursive (/SOME_PATH/loopback-next/node_modules/@microsoft/api-extractor/lib/analyzer/ExportAnalyzer.js:236:48)
at ExportAnalyzer._collectAllExportsRecursive (/SOME_PATH/loopback-next/node_modules/@microsoft/api-extractor/lib/analyzer/ExportAnalyzer.js:260:22)
```
I've tried a few things but still wasn't able to identify the problem:
1. force `showVerboseMessages` to be `true` in https://github.com/loopbackio/loopback-next/blob/master/packages/tsdocs/src/monorepo-api-extractor.ts#L258C5-L258C24 -> no effect
2. added `showDiagnostics: true,` before the line specified above -> it printed more info but it didn't mention where the error could be coming from.
3. When searching for similar errors, someone suggested (I lost the location where I saw that) to delete the folder `node_modules/@microsoft/api-extractor/node_modules/typescript`. But it didn't help either.
Since it's blocking the release of LB4 modules, we could possibly remove the api-extractor scripts. We would not have the latest API docs but at least we have the modules published while we're figuring this out.
@loopbackio/loopback-maintainers, thoughts?
### Logs
_No response_
### Additional information
_No response_
### Reproduction
https://github.com/loopbackio/loopback-next
- run `npm run tsdocs`
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
loopback-next リポジトリで `npm run tsdocs` を実行し、`@loopback/typeorm` で発生する失敗を再現してください。まず `packages/tsdocs/src/monorepo-api-extractor.ts` を読み、特に参照されている行の周辺にある設定を確認して、API Extractor から報告される `EventEmitter` シンボルのエラーを調査してください。コマンドが正常に完了し、リリース用の API ドキュメントを生成できれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- node.js, typescript
- 領域
- build-system, documentation, release
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- 説明が足りない
- 初心者へのやさしさ
- 35/100