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 · 1 comment
Open
3 tasks done

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants