Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Error stack highlights wrong line when an error is thrown in app #33917

@Yizack

Description

@Yizack

Environment

Operating system Windows 10.0.22631
CPU 12th Gen Intel(R) Core(TM) i7-12700K (20 cores)
Node.js version v22.20.0
nuxt/cli version 3.31.3
Package manager [email protected]
Nuxt version 4.2.2
Nitro version 2.12.9
Builder [email protected]
Config compatibilityDate, devtools
Modules -

Reproduction

https://stackblitz.com/edit/github-uwac4mps-wtxkeln9?file=app%2Fpages%2Findex.vue

Describe the bug

Hello! I have found that when any error is thrown (only during SSR), Nuxt highlights an incorrect line in the command line and error page.

In the reproduction, I used createError() but I believe it can happen anywhere in the script or template tags.

Image

Not sure if this is Nuxt-related, though

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions