Closed ausir0726 closed 6 months ago
Would you be able to provide a reproduction? 🙏
I am unable to reproduce the issue in stackblitz, but it does occur on my WIN/MAC OS. Still trying to figure out the problem.
@BobbieGoede
Finally, I was able to reproduce the error in Codesandbox. It seems that the error can only be reproduced on node v20 (but in my local env, I use node v18 got same error)
https://codesandbox.io/p/devbox/fancy-wave-7tjy7r
------------------------------
- Operating System: Linux
- Node Version: v20.9.0
- Nuxt Version: 3.11.1
- CLI Version: 3.11.1
- Nitro Version: 2.9.6
- Package Manager: npm@9.8.1
- Builder: -
- User Config: devtools, modules
- Runtime Modules: @nuxtjs/i18n@8.3.0
- Build Modules: -
------------------------------
Additional information
Everything is normal when using 3.10.3.
<ref *1> ComputedRefImpl {
getter: [Function: get],
_setter: [Function: set],
dep: undefined,
__v_isRef: true,
__v_isReadonly: false,
effect: ReactiveEffect {
fn: [Function (anonymous)],
trigger: [Function (anonymous)],
scheduler: undefined,
active: true,
deps: [ [Map] ],
_dirtyLevel: 0,
_trackId: 1,
_runnings: 0,
_shouldSchedule: false,
_depsLength: 1,
computed: [Circular *1]
},
_cacheable: true,
_value: 'en-US'
}
When using 3.11.0, there are no error messages displayed (have WARN), but the screen does not render (only displaying NUXT LOGO)
<ref *1> ComputedRefImpl {
getter: [Function: get],
_setter: [Function: set],
dep: undefined,
__v_isRef: true,
__v_isReadonly: false,
effect:
ReactiveEffect {
fn: [Function (anonymous)],
trigger: [Function (anonymous)],
scheduler: undefined,
active: true,
deps: [ [Map] ],
_dirtyLevel: 0,
_trackId: 1,
_runnings: 0,
_shouldSchedule: false,
_depsLength: 1,
computed: [Circular *1] },
_cacheable: true,
_value: 'en-US' }
WARN Cannot stringify arbitrary non-POJOs ComputedRefImpl
When using 3.11.1, an error occurs.
<ref *1> ComputedRefImpl {
getter: [Function: get],
_setter: [Function: set],
dep: undefined,
__v_isRef: true,
__v_isReadonly: false,
effect:
ReactiveEffect {
fn: [Function (anonymous)],
trigger: [Function (anonymous)],
scheduler: undefined,
active: true,
deps: [ [Map] ],
_dirtyLevel: 0,
_trackId: 1,
_runnings: 0,
_shouldSchedule: false,
_depsLength: 1,
computed: [Circular *1] },
_cacheable: true,
_value: 'en-US' }
WARN Cannot stringify arbitrary non-POJOs ComputedRefImpl
ERROR [nuxt] [request error] [unhandled] [500] Maximum call stack size exceeded
at Map.has (<anonymous>)
at stringify (/C:/Users/ausir/test/nuxt-pppp/node_modules/@nuxt/devalue/dist/devalue.mjs:74:15)
at /C:/Users/ausir/test/nuxt-pppp/node_modules/@nuxt/devalue/dist/devalue.mjs:91:58
at Array.map (<anonymous>)
at stringify (/C:/Users/ausir/test/nuxt-pppp/node_modules/@nuxt/devalue/dist/devalue.mjs:91:31)
at /C:/Users/ausir/test/nuxt-pppp/node_modules/@nuxt/devalue/dist/devalue.mjs:114:71
at Array.map (<anonymous>)
at stringify (/C:/Users/ausir/test/nuxt-pppp/node_modules/@nuxt/devalue/dist/devalue.mjs:114:39)
at /C:/Users/ausir/test/nuxt-pppp/node_modules/@nuxt/devalue/dist/devalue.mjs:91:58
at Array.map (<anonymous>)
It looks like this is related to the devLogs feature, it starts working again when disabling it by adding features: { devLogs: false }
do the Nuxt config.
Not sure if this is necessarily an issue caused by this module or caused by the way values are stringified by this feature 🤔 Will have to check if there's an existing issue on the Nuxt repo later.
According to https://github.com/nuxt/nuxt/issues/26605#issuecomment-2033691870
Should be fixed via https://github.com/nuxt/nuxt/pull/26503 on nightly
Environment
Build Modules: -
Reproduction
a empty nuxt 3 starter project install nuxt-i18n and console.log(locale)
Describe the bug
when I use nuxt@3.11.1 I console.log(locale) the page crash ( Maximum call stack size exceeded )
it's works nuxt@3.10
Additional context
Logs
No response