cloudflare / cloudflare/workerd

🐛 BUG: Stack traces do not include leading slash in file paths

Open
#3,644 1 comment 0 reactions 0 assignees View on GitHub
bug
Dominant language
C++
Stars
8.7k
Forks
739
Avg merge
2d 20h
Merged PRs (30d)
174

Description

### Which Cloudflare product(s) does this pertain to?

Workers Vitest Integration

### What version(s) of the tool(s) are you using?

0.4.17

### What version of Node are you using?

20

### What operating system and version are you using?

macOS Sonoma 14.5

### Describe the Bug

### Observed behavior

An error trace looks as follows:

```
Error: No such module "Users/hansotto/project/node_modules/db-errors/lib/parsers".
❯ Users/hansotto/project/node_modules/db-errors/lib/dbErrors.js?mf_vitest_no_cjs_esm_shim:1:17
❯ Users/hansotto/project/node_modules/objection/lib/objection.js?mf_vitest_no_cjs_esm_shim:11:5
```

This makes clicking to go to the source in VSCode a lot harder, because you have to prepend the slash and then go to the correct line manually.

### Expected behavior

It should look like this:

```
Error: No such module "/Users/hansotto/project/node_modules/db-errors/lib/parsers".
❯ /Users/hansotto/project/node_modules/db-errors/lib/dbErrors.js:1:17
❯ /Users/hansotto/project/node_modules/objection/lib/objection.js:11:5
```

### Please provide a link to a minimal reproduction

_No response_

### Please provide any relevant error logs

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.