swc-project / swc-node

Faster ts-node without typecheck
MIT License
1.68k stars 67 forks source link

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

Open bamboo512 opened 1 month ago

bamboo512 commented 1 month ago

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",
        },
    ]
}
bamboo512 commented 1 month ago

I have already tried reinstalling @swc-node/register, deleting entire node_modules folder and reinstalling modules with pnpm, but neither works.