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
ERROR Maximum call stack size exceeded #19783
Comments
Would you provide a reproduction? 🙏 |
Not 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 |
I have had a report that a similar issue is due to a rollup upgrade; we'll need to investigate but that is the most likely scenario. |
In my case the reason was Replace with direct import resolve the error |
Same for me 🥺 |
Related: unjs/nitro#1063, rollup/rollup#4904 |
this won't work with |
Would you please provide a reproduction? 🙏 |
This comment was marked as duplicate.
This comment was marked as duplicate.
This comment was marked as duplicate.
This comment was marked as duplicate.
To be more specific about the workaround, it works with Nuxt 3.3.0 (not 3.3.1 nor 3.3.2) and rollup 3.18.0. Note that you may need to remove other packages like |
@ddahan Would you be able to provide a reproduction? 🙏 The workaround has worked for others running Nuxt 3.3.1, as you see above. |
@danielroe I tried using a stackblitz with the same packages than in local but was unable to reproduce the issue. |
@danielroe there is a reproduction: https://stackblitz.com/edit/nuxt-starter-6usrbo?file=components/TestFailing.vue (nuxt 3.3.3 + nuxt-lodash) |
Not sure this will really help, but when trying to build a reproduction, I noticed something similar: by removing a single call in one of my component (in my case: |
i can confirm this work now with 3.3.3 even with nuxt lodash |
@hi-reeve Can you share more information? I can still reproduce with the provided reproduction even with latest Nuxt edge. |
updated to 3.3.3 and removing the pinned rollup 3.18 solved the issue for me. my package.json "devDependencies": {
"@commitlint/cli": "^17.5.1",
"@commitlint/config-conventional": "^17.4.4",
"@nuxt/eslint-config": "^0.1.1",
"@nuxt/image-edge": "1.0.0-28008586.381b906",
"@nuxt/kit": "^3.3.3",
"@nuxt/test-utils": "^3.3.3",
"@nuxtjs/eslint-module": "^4.0.2",
"@nuxtjs/i18n": "8.0.0-beta.9",
"@nuxtjs/tailwindcss": "^6.6.5",
"@pinia-plugin-persistedstate/nuxt": "1.1.1",
"@rushstack/eslint-patch": "^1.2.0",
"@types/lodash-es": "^4.17.7",
"@vee-validate/yup": "^4.8.4",
"@vite-pwa/nuxt": "^0.0.7",
"@vitest/coverage-c8": "^0.29.8",
"@vue-macros/nuxt": "^1.2.8",
"@vue/runtime-dom": "^3.2.47",
"@vueuse/core": "^9.13.0",
"@vueuse/nuxt": "^9.13.0",
"eslint": "^8.37.0",
"eslint-plugin-vuejs-accessibility": "^2.1.0",
"husky": "^8.0.3",
"nuxt": "^3.3.3",
"nuxt-icon": "^0.3.3",
"nuxt-lodash": "^2.4.1",
"nuxt-typed-router": "^3.0.9",
"nuxt-vitest": "^0.6.9",
"prettier": "^2.8.7",
"sass": "^1.60.0",
"standard-version": "^9.5.0",
"ts-toolbelt": "^9.6.0",
"vite-plugin-vue-type-imports": "^0.2.4"
},
"dependencies": {
"@casl/ability": "^6.4.0",
"@casl/vue": "^2.2.1",
"@firebase/app-types": "^0.9.0",
"@huntersofbook/naive-ui-nuxt": "^0.7.1",
"@nuxt-alt/proxy": "^2.2.3",
"@nuxtjs/robots": "^3.0.0",
"@pinia/nuxt": "^0.4.7",
"@tanstack/vue-query": "^4.27.0",
"@tanstack/vue-virtual": "3.0.0-beta.54",
"@vueuse/motion": "2.0.0-beta.25",
"axios": "^1.3.5",
"change-case": "^4.1.2",
"date-fns": "^2.29.3",
"date-fns-tz": "^2.0.0",
"firebase": "^9.19.1",
"firebase-admin": "^11.5.0",
"jwt-decode": "^3.1.2",
"maska": "^2.1.7",
"nanoid": "^4.0.2",
"pinia": "^2.0.33",
"pinia-plugin-persistedstate": "^3.1.0",
"vee-validate": "^4.8.4",
"yup": "^1.0.2",
"zod": "^3.21.4"
} my nuxt.config.ts import { i18n } from './config/i18n';
// https://nuxt.com/docs/api/configuration/nuxt-config
export default defineNuxtConfig({
typescript: {
includeWorkspace: true,
tsConfig: {
include: ['../**/*.d.ts'],
},
},
runtimeConfig: {
public: {
firebase: {
apiKey: process.env.NUXT_FIREBASE_API_KEY,
authDomain: process.env.NUXT_FIREBASE_AUTH_DOMAIN,
projectId: process.env.NUXT_FIREBASE_PROJECT_ID,
storageBucket: process.env.NUXT_FIREBASE_STORAGE_BUCKET,
messagingSenderId:
process.env.NUXT_FIREBASE_MESSAGING_SENDER_ID,
appId: process.env.NUXT_FIREBASE_APP_ID,
},
},
},
//@ts-ignore
modules: [
'@nuxtjs/i18n',
'nuxt-icon',
'@nuxtjs/tailwindcss',
'@vueuse/nuxt',
'@nuxt/image-edge',
'nuxt-typed-router',
'@nuxtjs/robots',
'@huntersofbook/naive-ui-nuxt',
'@vue-macros/nuxt',
[
'@pinia/nuxt',
{
autoImports: [
// automatically imports `defineStore` as `definePiniaStore`
['defineStore', 'definePiniaStore'], // import { defineStore as definePiniaStore } from 'pinia'
],
},
],
'@pinia-plugin-persistedstate/nuxt',
'@vueuse/motion/nuxt',
'~/modules/vee-validate',
'~/modules/yup',
'~/modules/vue-query/module.ts',
'~/modules/vue-virtual.ts',
'nuxt-vitest',
'@nuxtjs/eslint-module',
'@nuxt-alt/proxy',
'vite-plugin-vue-type-imports/nuxt',
'nuxt-lodash',
],
extends: ['./auth'],
tailwindcss: {
cssPath: '~/assets/styles/main.scss',
},
lodash: {
prefix: '_',
upperAfterPrefix: false,
prefixSkip: false,
},
image: {
domains: ['images.unsplash.com'],
alias: { unsplash: 'https://images.unsplash.com' },
},
i18n,
naiveUI: {
themeOverrides: {},
},
css: [],
vite: {
define: {
// "process.env.DEBUG": false,
},
plugins: [],
},
imports: {
dirs: ['store', 'services/**', 'composables/**'],
imports: [
{
from: 'axios',
name: 'axios',
},
],
injectAtEnd: true,
},
routeRules: {
'/admin/**': { ssr: false },
'/customer/**': { ssr: false },
'/profile': { ssr: false },
'/admin': { redirect: '/admin/dashboard' },
'/customer': { redirect: '/customer/consignee-list' },
'/api/auth/logout': { static: true },
},
components: [
{
path: '~/components',
extensions: ['.vue'],
},
{
path: '~/components/global',
global: true,
},
],
proxy: {
proxies: {
'/proxy': {
target: process.env.API_BASE_URL,
changeOrigin: true,
rewrite: (path: string) => path.replace(/^\/proxy/, 'v1/'),
},
},
},
}); |
update once more, after few days not error, today i just got the error again on build. |
By following these steps, it is able to resolve this issue. Add the following code in
|
Did someone find a workaround using Nuxt 3.4? |
I can reproduce issue with just The workaround is still working for Nuxt 3.4.1: https://stackblitz.com/edit/nuxt-starter-wunnhm. |
A PR to fix this in rollup has been opened. You can test it by installing |
|
@ddahan In that case it would be very helpful for you to provide a reproduction so your situation can be addressed. (Do ensure that you are using pnpm/npm overrides or yarn resolutions to install the new |
@danielroe you were right I wasn't using |
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 |
Environment
Windows_NT
v18.15.0
3.3.1
2.3.1
npm@9.5.0
vite
modules
,imports
,runtimeConfig
,typescript
,app
,nitro
@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
-
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
The text was updated successfully, but these errors were encountered: