Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Internal Error: Unable to follow symbol for "const" when using as const #283

Open
3 tasks done
panvourtsis opened this issue Nov 15, 2023 · 2 comments
Open
3 tasks done
Labels
upstream Something about upstream packages

Comments

@panvourtsis
Copy link

panvourtsis commented Nov 15, 2023

Describe the bug

While i am using the plugin i found a problem that it cannot handle as const constants when passing to type. This is when the rollupTypes is true

image

Reproduction

https://stackblitz.com/~/github.com/panvourtsis/react-blogs/tree/panvourtsis/showcase-as-const

Steps to reproduce

navigate to the url that is a fork from react-blogs

I've change the Title.tsx with the as const demo prop

run yarn build

System Info

[vite:dts] Internal Error: Unable to follow symbol for "const"

You have encountered a software defect. Please consider reporting the issue to the maintainers of this application.
✓ built in 11.59s
error during build:
Error: Internal Error: Unable to follow symbol for "const"

You have encountered a software defect. Please consider reporting the issue to the maintainers of this application.
    at new InternalError (/home/panvourtsis/react-blogs/node_modules/@rushstack/node-core-library/lib/InternalError.js:24:9)
    at AstSymbolTable._analyzeChildTree (/home/panvourtsis/react-blogs/node_modules/@microsoft/api-extractor/lib/analyzer/AstSymbolTable.js:328:43)
    at AstSymbolTable._analyzeChildTree (/home/panvourtsis/react-blogs/node_modules/@microsoft/api-extractor/lib/analyzer/AstSymbolTable.js:377:18)
    at AstSymbolTable._analyzeChildTree (/home/panvourtsis/react-blogs/node_modules/@microsoft/api-extractor/lib/analyzer/AstSymbolTable.js:377:18)
    at AstSymbolTable._analyzeAstSymbol (/home/panvourtsis/react-blogs/node_modules/@microsoft/api-extractor/lib/analyzer/AstSymbolTable.js:247:18)
    at eval (/home/panvourtsis/react-blogs/node_modules/@microsoft/api-extractor/lib/analyzer/AstSymbolTable.js:259:34)
    at AstDeclaration.forEachDeclarationRecursive (/home/panvourtsis/react-blogs/node_modules/@microsoft/api-extractor/lib/analyzer/AstDeclaration.js:168:9)
    at AstDeclaration.forEachDeclarationRecursive (/home/panvourtsis/react-blogs/node_modules/@microsoft/api-extractor/lib/analyzer/AstDeclaration.js:170:19)
    at AstSymbol.forEachDeclarationRecursive (/home/panvourtsis/react-blogs/node_modules/@microsoft/api-extractor/lib/analyzer/AstSymbol.js:103:28)
    at AstSymbolTable._analyzeAstSymbol (/home/panvourtsis/react-blogs/node_modules/@microsoft/api-extractor/lib/analyzer/AstSymbolTable.js:254:27)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Validations

@qmhc
Copy link
Owner

qmhc commented Nov 30, 2023

Maybe a limitation of @microsoft/api-extractor (or TypeScript resolver), refer to microsoft/rushstack#3875.

@Gengkaibo
Copy link

error during build:
[vite:dts] Internal Error: Unable to follow symbol for "const"

You have encountered a software defect. Please consider reporting the issue to the maintainers of this application.
at AstSymbolTable.analyzeChildTree (D:\Project\1-HTHT\pie-earth\node_modules.pnpm@[email protected]@types[email protected]\node_modules@microsoft\api-extractor\src\analyzer\AstSymbolTable.ts:406:25)
at AstSymbolTable.analyzeChildTree (D:\Project\1-HTHT\pie-earth\node_modules.pnpm@[email protected]@types[email protected]\node_modules@microsoft\api-extractor\src\analyzer\AstSymbolTable.ts:473:12)
at AstSymbolTable.analyzeChildTree (D:\Project\1-HTHT\pie-earth\node_modules.pnpm@[email protected]@types[email protected]\node_modules@microsoft\api-extractor\src\analyzer\AstSymbolTable.ts:473:12)
at AstSymbolTable.analyzeAstSymbol (D:\Project\1-HTHT\pie-earth\node_modules.pnpm@[email protected]@types[email protected]\node_modules@microsoft\api-extractor\src\analyzer\AstSymbolTable.ts:312:12)
at AstSymbolTable.analyze (D:\Project\1-HTHT\pie-earth\node_modules.pnpm@microsoft+api-extractor@7.47.7_@types[email protected]\node_modules@microsoft\api-extractor\src\analyzer\AstSymbolTable.ts:154:19)
at D:\Project\1-HTHT\pie-earth\node_modules.pnpm@microsoft+api-extractor@7.47.7_@types[email protected]\node_modules@microsoft\api-extractor\src\analyzer\ExportAnalyzer.ts:340:42
at Map.forEach ()
at ExportAnalyzer.collectAllExportsRecursive (D:\Project\1-HTHT\pie-earth\node_modules.pnpm@[email protected]@types[email protected]\node_modules@microsoft\api-extractor\src\analyzer\ExportAnalyzer.ts:328:40)
at ExportAnalyzer.collectAllExportsRecursive (D:\Project\1-HTHT\pie-earth\node_modules.pnpm@[email protected]@types[email protected]\node_modules@microsoft\api-extractor\src\analyzer\ExportAnalyzer.ts:356:14)
at ExportAnalyzer.fetchAstModuleExportInfo (D:\Project\1-HTHT\pie-earth\node_modules.pnpm@microsoft+api-extractor@7.47.7_@types[email protected]\node_modules@microsoft\api-extractor\src\analyzer\ExportAnalyzer.ts:248:12)
 ELIFECYCLE  Command failed with exit code 1.

@qmhc qmhc added the upstream Something about upstream packages label Sep 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
upstream Something about upstream packages
Projects
None yet
Development

No branches or pull requests

3 participants