Skip to content

[vite] Internal server error: Maximum call stack size exceeded #11382

@nathan-de-pachtere

Description

@nathan-de-pachtere

Vue version

3.4.28 and above

Link to minimal reproduction

https://play.vuejs.org/#eNq1U01v00AQ/SujVYUTKSQicEAmTVWgh3KACjiuRCxnnGzrrK3dcRuw/N+ZWSeuk34gDr3EmY+dffPe21qdl+X4tkIVq5lPnSkJPFJVQp7Y1alW5LWaa2s2ZeEIanCYjWCJmbF47n/b9FPBFYuWoIHMFRuIeFikrbZpYT2B1N/A6aNHBoMhnM6hnT2IxpPQLGii4fCDtrNJi4jv54BwU+YJIUcAs3auTTbIIF2R3iBpBWtjieO10WrCfbNJ75Aa8TIMKjOr8bUvLG9cyyitUp5lcnTfSjIMWqsYQkVqSZ4Xd19CjlyFo30+XWN680j+2m8lp9WVQ4/uFrXqapS4lcCU8sWPr7jl/11xUyyrnLufKX5HX+SVYGzbPlZ2ybB7fQHtZeDT2NVPf7EltH6/lACVzib0a8VEC41PrX4P9+34XTinbcMsdiqJZ3oEawqqTOWfpninjXy02uXYWpzi3/uM+SNd8glGk+TMl4md13WQE5qGfSCJfTEvaM4p+YRLg22mx3JzuPNzz8mtt/t+vnJF6Tvvtha8tIQuS1KM2IRd5z9Nz81910//x/XTe9dre2do/RmzpMrJD9oRAeasZeQsBk+O9eXbX7ULzAfDkQinSRpiYGOEY0tWWhMvHUOUJXnEYXP0snaCBgAPBTUQp3niPfO3OKl5EJwJhxDm+YjXT16f1KJxA1xnFblhEZISNAvpjJpFT9sH8pmXku4ZJo9YO2CIQ4Z+SOITrHXXjckzebgN0FiCNruDuL+iE06wkZB2kJBb+y3y1n7dopP3y8P5EY6n71XzF6Pj9hY=

Steps to reproduce

Trying to reproduce inside SFC playground but no error showing up ...

Anyway, I was migrating from 3.4.21 to latest release (3.4.32) and my project didn't work anymore, no change in the code just upgraded vue.js version.

So I went minor version by minor version and the last vue.js version working is the 3.4.27 and then with 3.4.28 I got the vite error message [vite] Internal server error: Maximum call stack size exceeded targeting the file on component (in my case : "File: /home/xxxx/projects/MyComponent.vue")

Something wrong with the Props definition from external files and using them in two components. The error go away if I change my defineProps lines in both components (see SFC playground for context). Then hit another similar issue with another component trickier, can't find a way to solve it ...

What is expected?

Expected to work like previous version

What is actually happening?

An error is thrown :

11:45:20 AM [vite] Internal server error: Maximum call stack size exceeded
  Plugin: vite:vue
  File: /home/xxxx/projects/MyComponent.vue
at visitDirectory (/home/xxxx/projects/node_modules/typescript/lib/typescript.js:22211:60)
at visitDirectory (/home/xxxx/projects/node_modules/typescript/lib/typescript.js:22212:9)
at matchFiles (/home/xxxx/projects/node_modules/typescript/lib/typescript.js:22180:5)
at Object.readDirectory (/home/xxxx/projects/node_modules/typescript/lib/typescript.js:8764:14)
at getFileNamesFromConfigSpecs (/home/xxxx/projects/node_modules/typescript/lib/typescript.js:42798:29)
at getFileNames (/home/xxxx/projects/node_modules/typescript/lib/typescript.js:42291:23)
at parseJsonConfigFileContentWorker (/home/xxxx/projects/node_modules/typescript/lib/typescript.js:42195:16)
at Object.parseJsonConfigFileContent (/home/xxxx/projects/node_modules/typescript/lib/typescript.js:42128:10)
at loadTSConfig (/home/xxxx/projects/node_modules/@vue/compiler-sfc/dist/compiler-sfc.cjs.js:18640:22)
at loadTSConfig (/home/xxxx/projects/node_modules/@vue/compiler-sfc/dist/compiler-sfc.cjs.js:18655:22)

System Info

System:
    OS: Linux 6.5 Ubuntu 22.04.4 LTS 22.04.4 LTS (Jammy Jellyfish)
    CPU: (8) x64 Intel(R) Core(TM) i7-4790K CPU @ 4.00GHz
    Memory: 21.54 GB / 31.29 GB
    Container: Yes
    Shell: 5.8.1 - /usr/bin/zsh
  Binaries:
    Node: 20.8.0 - ~/.proto/shims/node
    Yarn: 3.6.4 - ~/.proto/shims/yarn
    npm: 9.7.1 - /usr/local/bin/npm
  Browsers:
    Chrome: 126.0.6478.126


Same on MacOS

Any additional comments?

Running into that error when updating vue.js package from 3.4.21 to 3.4.31

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions