microsoft / vscode-npm-scripts

VSCode extension for running npm-scripts and validating the package.json files.
MIT License
215 stars 55 forks source link

"The system cannot find the path specified." when attempting to run a "type": "npm" Task #167

Open ELLIOTTCABLE opened 2 years ago

ELLIOTTCABLE commented 2 years ago

Apologies if I've ended up in the wrong place, but I'm somewhat new to VScode.

I'm attempting to setup a task to simply run npm run start:

{
  "version": "2.0.0",
  "tasks": [
    {
      "label": "Parcel Server",
      "type": "npm",
      "script": "start",
      "problemMatcher": []
    }
  ]
}

It looks like "type": "npm" is contributed by this plugin ... am I correct?

Unfortunately, when I attempt to run that, a new task-terminal opens, but it doesn't appear to attempt to use zsh, WSL2, or anything sane - instead, it's ... maybe a decades-old "CMD" terminal? I'm honestly not sure. But this is all I see:

> Executing task: npm run start <

The system cannot find the path specified.

C:\Users\ec\Sync\Code\mod.repair>

What does this error-message mean? Is there a way I can get this working?

egamma commented 2 years ago

@ELLIOTTCABLE

It looks like "type": "npm" is contributed by this plugin ... am I correct?

It is confusing, but the npm task type is now provided by the npm extension that is bundled with VS Code https://github.com/microsoft/vscode/tree/main/extensions/npm. For historical reasons this extension existed before and then most of its functionality has been moved into VS Code core.

Running npm scripts is now also provided by this extension by what is called task auto detection.

Does this cover your scenario?