nuxt: ERROR Maximum call stack size exceeded
Environment
- Operating System:
Windows_NT - Node Version:
v18.15.0 - Nuxt Version:
3.3.1 - Nitro Version:
2.3.1 - Package Manager:
npm@9.5.0 - Builder:
vite - User Config:
modules,imports,runtimeConfig,typescript,app,nitro - Runtime Modules:
@nuxt/devtools@0.2.5,@nuxtjs/robots@3.0.0,@nuxtjs/tailwindcss@6.6.0,@pinia/nuxt@0.4.7,@vueuse/nuxt@9.13.0,nuxt-icons@3.1.0,nuxt-vitest@0.6.8 - Build Modules:
-
Reproduction
On a large project small project does not have this problem
Describe the bug
nuxt dev works fine but nuxt build failed
message ERROR Maximum call stack size exceeded
Additional context
No response
Logs
Nuxi 3.3.1 11:23:50
Nuxt 3.3.1 with Nitro 2.3.1 11:23:50
i Using default Tailwind CSS file from runtime/tailwind.css nuxt:tailwindcss 11:23:51
i Building client... 11:23:52
i vite v4.1.4 building for production... 11:23:52
i ✓ 400 modules transformed. 11:23:55
ERROR Maximum call stack size exceeded 11:23:55
ERROR Maximum call stack size exceeded 11:23:55
at Set.has (<anonymous>)
at ParameterVariable.deoptimizePath (/D:/Algostract/Orykit/store-web/node_modules/rollup/dist/es/shared/node-entry.js:6801:57)
at Identifier.deoptimizePath (/D:/Algostract/Orykit/store-web/node_modules/rollup/dist/es/shared/node-entry.js:8149:24)
at ObjectEntity.deoptimizeArgumentsOnInteractionAtPath (/D:/Algostract/Orykit/store-web/node_modules/rollup/dist/es/shared/node-entry.js:6051:22)
at FunctionExpression.deoptimizeArgumentsOnInteractionAtPath (/D:/Algostract/Orykit/store-web/node_modules/rollup/dist/es/shared/node-entry.js:8597:36)
at FunctionExpression.deoptimizeArgumentsOnInteractionAtPath (/D:/Algostract/Orykit/store-web/node_modules/rollup/dist/es/shared/node-entry.js:8973:15)
at ParameterVariable.addEntityToBeDeoptimized (/D:/Algostract/Orykit/store-web/node_modules/rollup/dist/es/shared/node-entry.js:6779:20)
at FunctionExpression.deoptimizeArgumentsOnInteractionAtPath (/D:/Algostract/Orykit/store-web/node_modules/rollup/dist/es/shared/node-entry.js:8589:45)
at FunctionExpression.deoptimizeArgumentsOnInteractionAtPath (/D:/Algostract/Orykit/store-web/node_modules/rollup/dist/es/shared/node-entry.js:8973:15)
at ParameterVariable.addEntityToBeDeoptimized (/D:/Algostract/Orykit/store-web/node_modules/rollup/dist/es/shared/node-entry.js:6779:20)
About this issue
- Original URL
- State: closed
- Created a year ago
- Reactions: 9
- Comments: 28 (12 by maintainers)
Related: https://github.com/unjs/nitro/issues/1063, https://github.com/rollup/rollup/issues/4904 Pinning rollup to 3.18.0 fixes the issue as a workaround
This issue has now been resolved in rollup@3.20.3 - you can refresh your lockfile to pull it in.
@davvvvsss I recommend opening a new issue along side a reproduction if you’re running into that error message again
@danielroe there is a reproduction: https://stackblitz.com/edit/nuxt-starter-6usrbo?file=components/TestFailing.vue (nuxt 3.3.3 + nuxt-lodash) You can run
yarn buildto see the error. There are two components, TestFailing.vue and TestWorking.vue, critical is this code@click="emit('open', useCloneDeep(schema))"if you remove it build will pass.@danielroe you were right I wasn’t using
overridesthe right way. I don’t have the issue anymore.Did someone find a workaround using Nuxt 3.4? I’d like to use the new View Transitions API Support, but I’m currently stuck with nuxt 3.3.0 and rollup 3.18.0 as it’s the only workaround I found. Thanks.
update once more, after few days not error, today i just got the error again on build. pinning back nuxt to
3.3.1and rollup to3.18.0this won’t work with
v3.3.2upgrading to3.3.2breaks it even with pinning rollup to3.18.0Not chiming in with anything particularly useful, but I hit the same thing after updating to 3.3.1:
It’s unclear if it happens consistently on the same
transforming <module>in Vite, just some module around750or so. It also failed on3.3.0and3.2.3, I had to downgrade to3.1.2to get it working again, at which point I hit https://github.com/nuxt/nuxt/issues/19717, which I fixed with https://github.com/nuxt/nuxt/issues/19717#issuecomment-1472328606. This is a pure Nuxt 3 project, no Nuxt 2 or bridge.