Friday 9 June 2017

Visual Code Run Build Task npm

I'm using Visual Studio Code 1.13.0
I have the following build script in my package.json:

{
  //omitted other props
  "scripts": {
    "build": "webpack"
  }
}

I've installed webpack with npm install --global webpack, so it's installed globally.

The webpack.config.js is irrelevant for my question.

When I run npm run build in the terminal, everything works fine. But when I run the Visual Code Tasks: Run Build Task (ctrl+shift+b or ctrl+shift+p > Run Build Task), then I'm getting the following message in the output window:

'"npm run build"' is not recognized as an internal or external command, operable program or batch file.

Why? (using npm version: 3.10.10)



via QuantumHive

No comments:

Post a Comment