NPM install fails on VSTS not locally
<p>I am having a strange issue and I don't have more options to try in my mind, hopefully you can give me a hand ;)</p>

<p>I am having a angular-cli project, handling dependencies with NPM, and some task on the build for the hosted agent on VSTS.</p>

<p>The problem is coming from few days ago (before it was working fine) and the NPM INSTALL command does not work anymore. I am going to attach all the info, but first, just to mention, things that I already tried:</p>

<ul>
<li>repair node-sass</li>
<li>remove angular-cli dependency</li>
<li>remove gulp-sass dependency</li>
<li>npm cache clean and prime</li>
<li>installing the package that the log is complaining about and then, it complains about another one (that means something is broken)</li>
</ul>

<p><strong>Package.json</strong></p>

<pre><code>{

  "name": "name",
  "version": "1.0.0",
  "description": "",
  "main": "src/app/main.ts",
  "scripts": {
    "build": "ng build",
    "start": "ng serve --host 0.0.0.0 --port 8080 --live-reload-port 49153",
    "dev": "ng build &amp;&amp; npm start",
    "lint": "tslint --project tslint.json",
    "test": "ng test",
    "pree2e": "webdriver-manager update",
    "e2e": "protractor",
    "postinstall": "gulp delete:types",
    "compile-ts": "node node_modules/typescript/lib/tsc.js -p ./tsconfig.json",
    "compile-sass": "gulp sass-compiler",
    "compile": "npm run compile-ts &amp;&amp; npm run compile-sass",
    "clean": "gulp delete",
    "zip": "gulp zip"
  },
  "author": "Alejandro",
  "license": "MIT",
  "dependencies": {
    "@angular/common": "~2.1.0",
    "@angular/compiler": "~2.1.0",
    "@angular/core": "~2.1.0",
    "@angular/forms": "~2.1.0",
    "@angular/http": "~2.1.0",
    "@angular/platform-browser": "~2.1.0",
    "@angular/platform-browser-dynamic": "~2.1.0",
    "@angular/router": "~3.1.0",
    "@ng-bootstrap/ng-bootstrap": "^1.0.0-alpha.7",
    "angular-cli": "^1.0.0-beta.20-4",
    "animate.css": "^3.5.2",
    "bootstrap": "^4.0.0-alpha.4",
    "core-js": "^2.4.1",
    "font-awesome": "^4.6.3",
    "jquery": "^3.1.1",
    "ng2-pagination": "^0.5.1",
    "reflect-metadata": "^0.1.8",
    "rxjs": "5.0.0-beta.12",
    "signalr": "^2.2.1",
    "systemjs": "0.19.39",
    "underscore": "^1.8.3",
    "zone.js": "^0.6.23"
  },
  "devDependencies": {
    "codelyzer": "1.0.0-beta.1",
    "del": "^2.2.1",
    "gulp": "^3.9.1",
    "gulp-fail": "^1.0.5",
    "gulp-sass": "^2.3.2",
    "gulp-zip": "^3.0.2",
    "protractor": "4.0.9",
    "ts-node": "1.2.1",
    "tslint": "3.13.0",
    "typescript": "~2.0.3",
    "typings": "^1.4.0"
  }
}
</code></pre>

<p><strong>NPM Debug Log</strong></p>

<p>(What I consider important about the log error)</p>

<pre><code>124543 verbose stack Error: node-sass@3.13.0 install: `node scripts/install.js`
124543 verbose stack Exit status 1
124543 verbose stack     at EventEmitter.&lt;anonymous&gt; (C:\Program Files\nodejs\node_modules\npm\lib\utils\lifecycle.js:239:16)
124543 verbose stack     at emitTwo (events.js:100:13)
124543 verbose stack     at EventEmitter.emit (events.js:185:7)
124543 verbose stack     at ChildProcess.&lt;anonymous&gt; (C:\Program Files\nodejs\node_modules\npm\lib\utils\spawn.js:24:14)
124543 verbose stack     at emitTwo (events.js:100:13)
124543 verbose stack     at ChildProcess.emit (events.js:185:7)
124543 verbose stack     at maybeClose (internal/child_process.js:850:16)
124543 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:215:5)
124544 verbose pkgid node-sass@3.13.0
124545 verbose cwd C:\a\1\s
124546 error Windows_NT 6.3.9600
124547 error argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install"
124548 error node v5.11.0
124549 error npm  v3.8.6
124550 error code ELIFECYCLE
124551 error node-sass@3.13.0 install: `node scripts/install.js`
124551 error Exit status 1
124552 error Failed at the node-sass@3.13.0 install script 'node scripts/install.js'.
</code></pre>

<p>The whole npm debug file is quite heavy, but if you think it could help, I'll upload to another server as a file in order to download it.</p>

<p>Last, let me say again, that was working untill few days ago, I change my dependencies to add testing tools (jasmine, karma, protactor...) and then it stopped working, and now even deleting them, still broken. Locally, it's working on my machine and on an another machine which never open the project before (that means there is nothing that I have locally that it makes the project work only on my environment)</p>

<p>Last 2, the command which fails it's NPM INSTALL, if I fix that one, the rest of the steps should go fine</p>

<p>Thanks in advance for you time, really appreciated.</p>