title: npm install failing using babel-presets / chai / mocha
body: <p>On Ubuntu 14.04.3 LTS with Node v0.10.40 and NPM 1.4.28</p>
  
  <p><code>npm install</code> is failing, I don't even get all my soft links in <code>node_modules/.bin</code> I expect.</p>
  
  <p>It seems to be something to do with <code>chai</code>, <code>webpack</code>, <code>webpack-dev-server</code> and <code>babel-preset-es2015</code> / <code>babel-preset-react</code>. If I take out Chai for example it works. If I take out the babel-preset packages it works. If they are all there, it doesn't.</p>
  
  <p><strong>Minimal broken packages.json</strong></p>
  
  <p>Here is a small <code>packages.json</code> config that breaks:</p>
  
  <pre><code>{
    "name": "voting-client",
    "version": "1.0.0",
    "description": "",
    "main": "index.jsx",
    "scripts": {
      "webpack": "webpack",
      "webpack-dev-server": "webpack-dev-server --host 0.0.0.0",
      "test": "mocha --compilers js:babel-core/register --require ./test/test_helper.js 'test/**/*.@(js|jsx)'",
      "test:watch": "npm run test --watch"
    },
    "author": "",
    "license": "ISC",
    "devDependencies": {
      "babel-core": "^6.0.20",
      "babel-loader": "^6.0.1",
      "babel-preset-es2015": "^6.0.15",
      "babel-preset-react": "^6.0.15",
      "chai": "^3.4.0",
      "mocha": "^2.3.3",
      "webpack": "^1.12.2",
      "webpack-dev-server": "^1.12.1"
    },
    "dependencies": {
    }
  }
  </code></pre>
  
  <p><strong>Actual packages.json</strong></p>
  
  <p>Here's my actual <code>packages.json</code> config that also breaks:</p>
  
  <pre><code>{
    "name": "voting-client",
    "version": "1.0.0",
    "description": "",
    "main": "index.jsx",
    "scripts": {
      "webpack": "webpack",
      "webpack-dev-server": "webpack-dev-server --host 0.0.0.0",
      "test": "mocha --compilers js:babel-core/register --require ./test/test_helper.js 'test/**/*.@(js|jsx)'",
      "test:watch": "npm run test --watch"
    },
    "author": "",
    "license": "ISC",
    "devDependencies": {
      "babel-core": "^6.0.20",
      "babel-loader": "^6.0.1",
      "babel-preset-es2015": "^6.0.15",
      "babel-preset-react": "^6.0.15",
      "chai": "^3.4.0",
      "chai-immutable": "^1.5.1",
      "jsdom": "^7.0.2",
      "mocha": "^2.3.3",
      "react-hot-loader": "^1.3.0",
      "webpack": "^1.12.2",
      "webpack-dev-server": "^1.12.1"
    },
    "dependencies": {
      "immutable": "^3.7.5",
      "react": "^0.14.2",
      "react-dom": "^0.14.2"
    }
  }
  </code></pre>
  
  <p><strong>Error from npm install</strong></p>
  
  <p>Looking more closely at the <code>npm install</code> I can see it is failing on a sub-package <code>utf-8-validate</code>. I know my gypsy install works because it compiles <code>socket.io</code> no problem in another project.</p>
  
  <pre><code>web23@wendy:/var/www/io.ofbeaton.com/web/dev/voting-client$ npm install
  npm WARN package.json voting-client@1.0.0 No description
  npm WARN package.json voting-client@1.0.0 No repository field.
  npm WARN package.json voting-client@1.0.0 No README data
  npm WARN optional dep failed, continuing fsevents@1.0.5
  npm WARN optional dep failed, continuing fsevents@1.0.5
  \
  &gt; utf-8-validate@1.2.1 install /var/www/clients/client1/web23/web/dev/voting-client/node_modules/webpack-dev-server/node_modules/socket.io/node_modules/engine.io/node_modules/ws/node_modules/utf-8-validate
  &gt; node-gyp rebuild
  
  make: Entering directory `/var/www/clients/client1/web23/web/dev/voting-client/node_modules/webpack-dev-server/node_modules/socket.io/node_modules/engine.io/node_modules/ws/node_modules/utf-8-validate/build'
    CXX(target) Release/obj.target/validation/src/validation.o
  Killed
  web23@wendy:/var/www/io.ofbeaton.com/web/dev/voting-client$   SOLINK_MODULE(target) Release/obj.target/validation.node
    SOLINK_MODULE(target) Release/obj.target/validation.node: Finished
    COPY Release/validation.node
  make: Leaving directory `/var/www/clients/client1/web23/web/dev/voting-client/node_modules/webpack-dev-server/node_modules/socket.io/node_modules/engine.io/node_modules/ws/node_modules/utf-8-validate/build'
  </code></pre>
  
  <p>See the <code>Killed</code> line in particular. That is all the output I get on broken installs. How is this happening? How can I fix it?</p>
  
  <p><strong>Working example without presets:</strong></p>
  
  <p>Here's a working <code>package.json</code> without the babel-presets.</p>
  
  <pre><code>{
    "name": "voting-client",
    "version": "1.0.0",
    "description": "",
    "main": "index.jsx",
    "scripts": {
      "webpack": "webpack",
      "webpack-dev-server": "webpack-dev-server --host 0.0.0.0",
      "test": "mocha --compilers js:babel-core/register --require ./test/test_helper.js 'test/**/*.@(js|jsx)'",
      "test:watch": "npm run test --watch"
    },
    "author": "",
    "license": "ISC",
    "devDependencies": {
      "babel-core": "^6.0.20",
      "babel-loader": "^6.0.1",   
      "chai": "^3.4.0",
      "mocha": "^2.3.3",
      "webpack": "^1.12.2",
      "webpack-dev-server": "^1.12.1"
    },
    "dependencies": {
    }
  }
  </code></pre>
  
  <p><strong>Edit: Is the problem an old node version?</strong></p>
  
  <p><a href="https://github.com/websockets/utf-8-validate/issues/18" rel="nofollow">https://github.com/websockets/utf-8-validate/issues/18</a> seemed to indicate an old node version would cause this.</p>
  
  <p>So I upgraded node to v5.0.0 and npm to 3.3.6.</p>
  
  <p>Here's the 'npm install' output:</p>
  
  <pre><code>web23@wendy:/var/www/io.ofbeaton.com/web/dev/voting-client$ npm install
  npm WARN install Couldn't install optional dependency: Unsupported
  extract → gunzTarPerm     ▐ ╢█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░╟
  Killed
  </code></pre>
  
  <p>No dice.</p>