Skip to content

The error overlay reports incorrectly identify the source of the error #35587

Closed

Description

@sawa-ko

Environment

~/projects/xorijywwyq.github
❯ npx nuxt info
│
● Nuxt root directory: /home/projects/xorijywwyq.github
│

Nuxt project info:

Operating system Linux 5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/150.0.0.0 Safari/537.36 Edg/150.0.0.0
CPU Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz (8 cores)
Node.js version v22.22.3
nuxt/cli version 3.35.2
Package manager [email protected]
Nuxt version 4.4.8
Nitro version 2.13.4
Builder [email protected]
Config compatibilityDate, devtools
Modules -

│
● 👉 Read documentation: https://nuxt.com
● 👉 Report an issue: https://github.com/nuxt/nuxt/issues/new?template=bug-report.yml
● 👉 Suggest an improvement: https://github.com/nuxt/nuxt/discussions/new

Reproduction

https://stackblitz.com/edit/github-zqjpkzaq?file=app%2Fapp.vue

Describe the bug

The error overlay always shows the incorrect line number for the source of the error. For example, in this case, it says the error is on line 16:15 of the app.vue file, but that file only has 11 lines of code, so it doesn't make any sense.

Image

Additional context

No response

Logs

Error
An error has occurred
ABC is not defined

Stack Trace
Pretty
Raw
H3Error {▼
  stack: 'ABC is not defined\n' +
  'at setup (/home/projects/xorijywwyq.github/app/app.vue:16:15)\n' +
  'at _sfc_main.setup (/home/projects/xorijywwyq.github/app/app.vue:37:23)\n' +
  'at callWithErrorHandling (/home/projects/xorijywwyq.github/node_modules/.pnpm/@[email protected]/node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:200:19)\n' +
  'at setupStatefulComponent (/home/projects/xorijywwyq.github/node_modules/.pnpm/@[email protected]/node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:8142:25)\n' +
  'at setupComponent (/home/projects/xorijywwyq.github/node_modules/.pnpm/@[email protected]/node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:8104:36)\n' +
  'at renderComponentVNode (/home/projects/xorijywwyq.github/node_modules/.pnpm/@[email protected][email protected]/node_modules/@vue/server-renderer/dist/server-renderer.cjs.js:678:15)\n' +
  'at ssrRenderComponent (/home/projects/xorijywwyq.github/node_modules/.pnpm/@[email protected][email protected]/node_modules/@vue/server-renderer/dist/server-rend'... 499 more characters,
  message: 'ABC is not defined',
  cause: ReferenceError {▼},
  statusCode: 500,
  fatal: false,
  unhandled: false,
  statusMessage: undefined,
  data: undefined,
  __nuxt_error: true,
  status: [Getter]
  statusText: [Getter]
}
Error Cause
ReferenceError {▼}
Request
url
http://localhost:3000/
method
GET
headers
accept	text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7
connection	keep-alive
host	localhost:3000
origin	http://localhost:3000
referer	https://localhost:3000/
sec-ch-ua	"Not;A=Brand";v="8", "Chromium";v="150", "Microsoft Edge";v="150"
sec-ch-ua-mobile	?0
sec-ch-ua-platform	"Windows"
sec-fetch-dest	iframe
upgrade-insecure-requests	1
user-agent	Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/150.0.0.0 Safari/537.36 Edg/150.0.0.0
x-forwarded-for	127.0.0.1
x-forwarded-proto	http

Activity

  1. coderabbitai commented on Jul 15, 2026

    @coderabbitai
    Contributor
    ⚠️ Possible Duplicate Issue(s)

    📝 Issue Planner

    Check the box below or use the @coderabbitai plan command to generate an implementation plan and prompts that you can use with your favorite coding assistant.

    • Create Plan

    🧪 Issue enrichment is currently in open beta.

    You can configure auto-planning by selecting labels in the issue_enrichment configuration.

    To disable automatic issue enrichment, add the following to your .coderabbit.yaml:

    issue_enrichment:
      auto_enrich:
        enabled: false

    💬 Have feedback or questions? Drop into our discord!

  2. changed the title [-]The error reports incorrectly identify the source of the error[/-] [+]The error overlkay reports incorrectly identify the source of the error[/+] on Jul 15, 2026
  3. changed the title [-]The error overlkay reports incorrectly identify the source of the error[/-] [+]The error overlay reports incorrectly identify the source of the error[/+] on Jul 15, 2026
  4. OrbisK commented on Jul 15, 2026

    @OrbisK
    Member

    quick triage reveals:

    WARN  [plugin nuxt:module-preload-polyfill] Sourcemap is likely to be incorrect: a plugin (nuxt:module-preload-polyfill) was used to transform files, but didn't generate a sourcemap for the transformation. Consult the plugin documentation for help
    

    Maybe related to: https://github.com/nuxt/nuxt/pull/35058/changes#diff-9abe08b1a4d639e2bce583f5243c9afb3e7ba663afeeb3bdc62edbcaea69e632R28

    cc @danielroe

  5. danielroe commented on Jul 18, 2026

    @danielroe
    Member

    I think that commit hasn't been released yet

  6. OrbisK commented on Jul 18, 2026

    @OrbisK
    Member

    I think that commit hasn't been released yet

    checked with nightly. It seems to fix the WARN [plugin nuxt:module-preload-polyfill] Sourcemap is likely to be incorrect but sources are still not correct 🤔

  7. danielroe commented on Jul 18, 2026

    @danielroe
    Member

    it might be a nitro transform/plugin as that's where the sourcemap is coming from in that error overlay

  8. Askerka00 commented on Jul 20, 2026

    @Askerka00
    Contributor

    Hi @danielroe and @OrbisK!

    I made a fix for the stack trace.

    @danielroe, your commit in #33989 really helped so the lines in fix-stacktrace could actually run without crashing on the import.

    In fix-stacktrace, I added a request for the sourcemap from vite over IPC. On the vite side, it fetches the sourcemap directly from Vite's native in-memory moduleGraph (from ssrServer.environments.ssr.moduleGraph). Then in fix-stacktrace, I added decoding for the sourcemap, and Nitro successfully passes the updated error to youch.

  9. github-actions commented on Aug 5, 2026

    @github-actions
    Contributor

    This issue was resolved by #35758, which was released in v4.5.2.

    If you are still seeing this problem after upgrading, please let us know (ideally with an updated reproduction) and we will take another look.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions