Skip to content

cli-plugin-typescript: RangeError: Maximum call stack size exceeded #2019

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

Closed
justinkames opened this issue Aug 1, 2018 · 4 comments
Closed
Labels
needs reproduction This issue is missing a minimal runnable reproduction, provided by the author

Comments

@justinkames
Copy link

justinkames commented Aug 1, 2018

Version

@vue/[email protected]
@vue/[email protected]

Node and OS info

node v9.30, npm 6.2.0, macosx high sierra

Steps to reproduce

I initially had a vue-cli project 3.0 with default settings ( babel ). I added typescript support with this command : vue add @vue/typescript. It converted all my .js files to .ts files. This worked as expected. However when running or vue-cli-service build i get an error: RangeError: Maximum call stack size exceeded. I'm not able to build the project, it is stuck. vue-cli-service serve does work properly. How can I debug this?

What is expected?

For vue-cli-service build to work properly.

What is actually happening?

> vue-cli-service build


⠙  Building for production...Starting type checking and linting service...
Using 1 worker with 2048MB memory limit
⠧  Building for production.../Users/user/Documents/app/node_modules/fork-ts-checker-webpack-plugin/lib/service.js:22
        throw error;
        ^

RangeError: Maximum call stack size exceeded
    at compareComparableValues (/Users/user/Documents/app/node_modules/typescript/lib/typescript.js:1482:37)
    at compareValues (/Users/user/Documents/app/node_modules/typescript/lib/typescript.js:1494:16)
    at Object.binarySearch (/Users/user/Documents/app/node_modules/typescript/lib/typescript.js:1030:21)
    at addTypeToUnion (/Users/user/Documents/app/node_modules/typescript/lib/typescript.js:37021:82)
    at addTypesToUnion (/Users/user/Documents/app/node_modules/typescript/lib/typescript.js:37037:28)
    at getUnionType (/Users/user/Documents/app/node_modules/typescript/lib/typescript.js:37117:28)
    at getArrayLiteralType (/Users/user/Documents/app/node_modules/typescript/lib/typescript.js:44356:17)
    at checkArrayLiteral (/Users/user/Documents/app/node_modules/typescript/lib/typescript.js:44351:20)
    at checkExpressionWorker (/Users/user/Documents/app/node_modules/typescript/lib/typescript.js:49158:28)
    at checkExpression (/Users/user/Documents/app/node_modules/typescript/lib/typescript.js:49108:42)
⠼  Building for production...


@justinkames
Copy link
Author

justinkames commented Aug 1, 2018

Running node --max_old_space_size=4096 node_modules/.bin/vue-cli-service build or node --stack_size=2000 node_modules/.bin/vue-cli-service build

Does not change the issue.

@LinusBorg LinusBorg added the needs reproduction This issue is missing a minimal runnable reproduction, provided by the author label Aug 1, 2018
@LinusBorg
Copy link
Member

We can't say anything about this without a reproduction of the problem.

If you can't reduce the problem to a small reproduction, it's likely specific to the typescript code that you created, and the fork-ts-checker plugin which does the typeschecking

@yyx990803
Copy link
Member

Closing due to lack of reproduction.

@TeamDman
Copy link

I believe it was fixed here
Updating typescript fixed it for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs reproduction This issue is missing a minimal runnable reproduction, provided by the author
Projects
None yet
Development

No branches or pull requests

4 participants