title: Using "npm run build" fails with "npm ERR! missing script: build"
body: <p>How can i fix this error, I'm running Windows 10</p>
  
  <p>When i try to <strong>npm run build</strong> on the cmd i get this error</p>
  
  <pre><code>C:\Users\anai_&gt; npm run build
  npm ERR! missing script: build
  </code></pre>
  
  <p>Here is the log of the run</p>
  
  <pre><code>0 info it worked if it ends with ok
  1 verbose cli [ 'C:\\Program Files\\nodejs\\node.exe',
  1 verbose cli   'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
  1 verbose cli   'run',
  1 verbose cli   'build' ]
  2 info using npm@5.5.1
  3 info using node@v9.1.0
  4 verbose config Skipping project config: C:\Users\anai_/.npmrc. (matches userconfig)
  5 verbose stack Error: missing script: build
  5 verbose stack     at run (C:\Program Files\nodejs\node_modules\npm\lib\run-script.js:151:19)
  5 verbose stack     at C:\Program Files\nodejs\node_modules\npm\lib\run-script.js:61:5
  5 verbose stack     at C:\Program Files\nodejs\node_modules\npm\node_modules\read-package-json\read-json.js:115:5
  5 verbose stack     at C:\Program Files\nodejs\node_modules\npm\node_modules\read-package-json\read-json.js:402:5
  5 verbose stack     at checkBinReferences_ (C:\Program Files\nodejs\node_modules\npm\node_modules\read-package-json\read-json.js:357:45)
  5 verbose stack     at final (C:\Program Files\nodejs\node_modules\npm\node_modules\read-package-json\read-json.js:400:3)
  5 verbose stack     at then (C:\Program Files\nodejs\node_modules\npm\node_modules\read-package-json\read-json.js:160:5)
  5 verbose stack     at ReadFileContext.&lt;anonymous&gt; (C:\Program Files\nodejs\node_modules\npm\node_modules\read-package-json\read-json.js:332:20)
  5 verbose stack     at ReadFileContext.callback (C:\Program Files\nodejs\node_modules\npm\node_modules\graceful-fs\graceful-fs.js:78:16)
  5 verbose stack     at FSReqWrap.readFileAfterOpen [as oncomplete] (fs.js:437:13)
  6 verbose cwd C:\Users\anai_
  7 verbose Windows_NT 10.0.15063
  8 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "build"
  9 verbose node v9.1.0
  10 verbose npm  v5.5.1
  11 error missing script: build
  12 verbose exit [ 1, true ]
  </code></pre>
  
  <p>Although the error refers to a <strong>missing script build</strong>, i have placed a 'build' script in my package.json</p>
  
  <pre><code>{
    "name": "es6",
    "version": "1.0.0",
    "main": "index.js",
    "scripts": {
      "build": "webpack"
    },
    "keywords": [],
    "author": "",
    "license": "ISC",
    "devDependencies": {
      "webpack": "^3.8.1"
    }
  
  }
  </code></pre>
  
  <p>and this is my webpack.config.js file</p>
  
  <pre><code>module.exports = {
    entry: ['./app/index.js'],
    output: {
      path: './build',
      filename: 'bundle.js'
  
    }
  }
  </code></pre>
  
  <p>Can anyone tell me how to fix this error or where it is coming from. I am new to using node.js, webpack and the command line. Thanks in advance for your time!</p>