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

RangeError: Maximum call stack size exceeded when using Vue 2.7.7, works with 2.7.6 #12683

Closed
DerAlbertCom opened this issue Jul 19, 2022 · 11 comments

Comments

@DerAlbertCom
Copy link

Version

2.7.7

Reproduction link

github.com

Steps to reproduce

Clone the repository

Switching to the Working branch which is using vue 2.7.6

git switch vue276

Clearing node_modules, install node_modules and clearing jest cache

./clear-npm.sh

npm run serve no problem

npm run test:unit also no problem

For testing with vue 2.7.7

git switch vue277

Clearing node_modules, install node_modules and clearing jest cache

./clear-npm.sh

npm run serve see errors

npm run test:unit see errors

What is expected?

Serving the Application, running the tests. Behave like 2.7.6 ;)

What is actually happening?

With Vue 2.7.7 I get an error like this on npm run serve

 DONE  Compiled successfully in 1727ms                                                                       


  App running at:
  - Local:   http://localhost:8080/
  - Network: http://192.168.6.80:8080/

  Note that the development build is not optimized.
  To create a production build, run npm run build.

Issues checking in progress...
RangeError: Maximum call stack size exceeded
RangeError: Maximum call stack size exceeded
    at unwrapNondistributiveConditionalTuple (/Users/aweinert/src/private/vuejs-problem/the277/node_modules/typescript/lib/typescript.js:62529:85)
    at _loop_18 (/Users/aweinert/src/private/vuejs-problem/the277/node_modules/typescript/lib/typescript.js:62542:49)
    at getConditionalType (/Users/aweinert/src/private/vuejs-problem/the277/node_modules/typescript/lib/typescript.js:62656:31)
    at getConditionalTypeInstantiation (/Users/aweinert/src/private/vuejs-problem/the277/node_modules/typescript/lib/typescript.js:63621:25)
    at instantiateTypeWorker (/Users/aweinert/src/private/vuejs-problem/the277/node_modules/typescript/lib/typescript.js:63698:24)
    at instantiateTypeWithAlias (/Users/aweinert/src/private/vuejs-problem/the277/node_modules/typescript/lib/typescript.js:63646:26)
    at instantiateType (/Users/aweinert/src/private/vuejs-problem/the277/node_modules/typescript/lib/typescript.js:63629:37)
    at getTypeOfInstantiatedSymbol (/Users/aweinert/src/private/vuejs-problem/the277/node_modules/typescript/lib/typescript.js:56830:48)
    at getTypeOfSymbol (/Users/aweinert/src/private/vuejs-problem/the277/node_modules/typescript/lib/typescript.js:56897:24)
    at compareProperties (/Users/aweinert/src/private/vuejs-problem/the277/node_modules/typescript/lib/typescript.js:67273:33)

on npm run test:unit this happens

 PASS  tests/unit/example.spec.ts
 FAIL  tests/unit/ComponentContext.spec.ts
  ● Test suite failed to run

    RangeError: Maximum call stack size exceeded

      at getObjectTypeInstantiation (node_modules/typescript/lib/typescript.js:63402:44)
      at instantiateTypeWorker (node_modules/typescript/lib/typescript.js:63666:28)
      at instantiateTypeWithAlias (node_modules/typescript/lib/typescript.js:63646:26)
      at instantiateType (node_modules/typescript/lib/typescript.js:63629:37)
      at instantiateList (node_modules/typescript/lib/typescript.js:63257:34)
      at instantiateTypes (node_modules/typescript/lib/typescript.js:63271:20)
      at instantiateTypeWorker (node_modules/typescript/lib/typescript.js:63660:48)
      at instantiateTypeWithAlias (node_modules/typescript/lib/typescript.js:63646:26)
      at instantiateType (node_modules/typescript/lib/typescript.js:63629:37)
      at getMappedType (node_modules/typescript/lib/typescript.js:63300:91)
      at node_modules/typescript/lib/typescript.js:63432:82
      at Object.map (node_modules/typescript/lib/typescript.js:638:29)
      at getObjectTypeInstantiation (node_modules/typescript/lib/typescript.js:63432:40)
      at instantiateTypeWorker (node_modules/typescript/lib/typescript.js:63666:28)
      at instantiateTypeWithAlias (node_modules/typescript/lib/typescript.js:63646:26)
      at instantiateType (node_modules/typescript/lib/typescript.js:63629:37)

Test Suites: 1 failed, 1 passed, 2 total
Tests:       1 passed, 1 total
Snapshots:   0 total
Time:        5.039 s

I disabled webpack cache in the repro, also clearing jest cache.

This is the simplest reproduction I could create. In the real application npm run serve does not even start
the application, it stops at 51% with a call stack size exceeded message. But the Unit Test are running.

In the vue276 branch I added the vue-template-compiler package in version 2.7.6 to force the version.

@Gabba90
Copy link

Gabba90 commented Jul 20, 2022

Hello,

the cause is in the type fix: #12666.
That leads to circular dependencies between:

I am experiencing the same error when trying to generate the TypeScript coverage report.

@aKzenT
Copy link

aKzenT commented Jul 20, 2022

I'm facing the same problem.

@aKzenT
Copy link

aKzenT commented Jul 22, 2022

I'm still seeing this issue on 2.7.6, 2.7.7 and now 2.7.8 . 2.7.5 works without issue:
image

image

@fallemand
Copy link

fallemand commented Sep 16, 2022

This still is happening in Vue 2.7.10 for me. Can somebody else confirm?

@akselil
Copy link

akselil commented Sep 22, 2022

This still is happening in Vue 2.7.10 for me. Can somebody else confirm?

The issue occurs also for me with vue 2.7.10.

@dearcodes
Copy link

Should this be closed? Still happening on 2.7.13

@akselil
Copy link

akselil commented Nov 2, 2022

The reason behind the error was @types/vuelidate": "^0.7.4". After removing it from dependencies the error was gone.

@pkonieczniak
Copy link

pkonieczniak commented Dec 1, 2022

The reason behind the error was @types/vuelidate": "^0.7.4". After removing it from dependencies the error was gone.

We had exactly the same version of vuelidate types and I can confirm that removing it from monorepo solved the problem.

Alternatively, if you need to keep @vuelidate types, there is an option with adding a patch to the package. #12750 (comment)

@ColinRosati
Copy link

I'm having this error with no @types/vuelidate dependency. Vue 2.7.14

@fallemand
Copy link

fallemand commented Mar 1, 2023

I have the same issue without using vuelidate. Had to rollback to [email protected]

@ushinnary
Copy link

Hello, i've been searching for an issue in our project. I found that we had some Class components with Mixins(...). Once removed it compiles just fine. Hope it helps to some of you :)
Tested on vue 2.7.14

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

9 participants