vscode: Unable to run npm build task

Issue Type: Bug

I’m not sure what changed, but pressing ctrl+shift+b has stopped working for me since yesterday’s insiders build.

> Executing task: npm run build <

-Command : The term '-Command' is not recognized as the name of a cmdlet, function,
script file, or operable program. Check the spelling of the name, or if a path was
included, verify that the path is correct and try again.
At line:1 char:1
+ -Command npm run build
+ ~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (-Command:String) [], CommandNotFoundExc
   eption
    + FullyQualifiedErrorId : CommandNotFoundException

The terminal process terminated with exit code: 1

tasks.json

{
    // See https://go.microsoft.com/fwlink/?LinkId=733558
    // for the documentation about the tasks.json format
    "version": "2.0.0",
    "tasks": [
        {
            "type": "npm",
            "script": "build",
            "identifier": "build",
            "group": {
                "kind": "build",
                "isDefault": true
            },
            "presentation": {
                "reveal": "silent",
                "panel": "shared"
            },
            "problemMatcher": "$tsc"
        }
    ]
}

The actual build command is a simple tsc -p ./src.

VS Code version: Code - Insiders 1.23.0-insider (95101bf3f6d00105621cdddb639ea62b95ea2468, 2018-04-06T08:49:48.798Z) OS version: Windows_NT x64 10.0.16299

Extensions: none

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Reactions: 1
  • Comments: 17 (11 by maintainers)

Most upvoted comments

I can confirm that this is fixed on my side.