Reputation: 7802
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 ;)
I am having a angular-cli project, handling dependencies with NPM, and some task on the build for the hosted agent on VSTS.
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:
Package.json
{
"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 && 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 && 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"
}
}
NPM Debug Log
(What I consider important about the log error)
124543 verbose stack Error: [email protected] install: `node scripts/install.js`
124543 verbose stack Exit status 1
124543 verbose stack at EventEmitter.<anonymous> (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.<anonymous> (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 [email protected]
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 [email protected] install: `node scripts/install.js`
124551 error Exit status 1
124552 error Failed at the [email protected] install script 'node scripts/install.js'.
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.
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)
Last 2, the command which fails it's NPM INSTALL, if I fix that one, the rest of the steps should go fine
Thanks in advance for you time, really appreciated.
Upvotes: 1
Views: 2049
Reputation: 7802
I found the problem after going though VSTS history, check differences and one by one removing the libraries to see what was breaking the build just on the VSTS and not locally.
It's protactor in that version 4.0.9 which is responsible of messing up the build with some sub-dependencies. I'm going to report it to their team just to let them now for future versions.
Hope this will help someone out there :)
Protactor repository issue: here
Upvotes: 1