Skip to content
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

Stack trace line numbers incorrect using vite-node on Windows #7021

Closed
6 tasks done
rmuchall opened this issue Dec 5, 2024 · 4 comments
Closed
6 tasks done

Stack trace line numbers incorrect using vite-node on Windows #7021

rmuchall opened this issue Dec 5, 2024 · 4 comments

Comments

@rmuchall
Copy link

rmuchall commented Dec 5, 2024

Describe the bug

Stack trace line numbers are incorrect when using vite-node on Windows.
Using the following dependency versions:
"vite": "5.4.11",
"vite-node": "2.1.8",
"vitest": "2.1.8"

Reproduction

https://github.com/rmuchall/vite-node-bug

System Info

System:
    OS: Windows 11 10.0.26100
    CPU: (2) x64 Intel(R) Core(TM) i7-10870H CPU @ 2.20GHz
    Memory: 698.26 MB / 8.00 GB
  Binaries:
    Node: 22.12.0 - C:\Program Files\nodejs\node.EXE
    npm: 10.9.0 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Edge: Chromium (129.0.2792.65)

Used Package Manager

npm

Validations

@rmuchall
Copy link
Author

rmuchall commented Dec 5, 2024

In the minimal reproduction repo. The stack trace should be line 15 but is instead showing as line 10.

@hi-ogawa
Copy link
Contributor

hi-ogawa commented Dec 5, 2024

This might be fixed recently (but not released) #6786
Can you try https://pkg.pr.new/vite-node@main https://vitest.dev/guide/#using-unreleased-commits?

@rmuchall
Copy link
Author

rmuchall commented Dec 5, 2024

Many thanks for your super fast response.
I can confirm that using the fix from https://pkg.pr.new/vite-node@main successfully resolves this issue.
Line numbers are working correctly again. Thank you!

@AriPerkkio
Copy link
Member

Fixed by #6786.

@github-actions github-actions bot locked and limited conversation to collaborators Dec 20, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants