swc-project / swc-project/swc-node

Cannot find module './swc.darwin-universal.node' when debugging with `skipFiles` option in VS Code

Open
#783 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
2k
Forks
95
Avg merge
14d 11h
Merged PRs (30d)
1

Description

Cannot find module './swc.darwin-universal.node' when debugging with skipFiles option in the launch.json file.
截屏2024-06-01 12 52 51_副本

Here is my launch.json:

{
    "version": "0.2.0",
    "configurations": [
        {
            "type": "node",
            "name": "swc-node Debugger",
            "request": "launch",
            "cwd": "${workspaceFolder}",
            "runtimeExecutable": "node",
            "args": [
                "-r",
                "@swc-node/register",
                "index.ts"
            ],
            "skipFiles": [
                "<node_internals>/**/*.js",
                "${workspaceFolder}/node_modules/**/*.js",
            ],
            "console": "integratedTerminal",
            "internalConsoleOptions": "neverOpen",
        },
    ]
}

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the supplied launch.json and the @swc-node/register entry point, then reproduce the failure in the VS Code debugger with skipFiles enabled. Trace why loading index.ts reports the missing ./swc.darwin-universal.node module. Done means the same configuration starts debugging without that module error.

Written by the indexing model from the issue text.

Assessment

Tech stack
node.js, typescript, vscode
Domain
developer-experience, devtools
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.