loopbackio / loopbackio/loopback-next

Error when running `npm run tsdocs`

Aperta
#10,205 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

bug
Lingua principale
TypeScript
Stelle
5.1k
Fork
1.1k
Merge medio
2g 21h
PR unite (30g)
27

Descrizione

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 (<anonymous>)
    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

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Esegui npm run tsdocs nel repository loopback-next e riproduci il problema in @loopback/typeorm. Inizia leggendo packages/tsdocs/src/monorepo-api-extractor.ts, in particolare la configurazione intorno alla riga indicata, e analizza l’errore relativo al simbolo EventEmitter di API Extractor. Il lavoro è completato quando il comando termina correttamente e la documentazione API può essere generata per la release.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
node.js, typescript
Ambito
build-system, documentation, release
Tipo di issue
Bug
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Da chiarire
Idoneità per principianti
35/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.