我遇到了一个奇怪的问题,我没有更多的选择可以尝试在我的脑海里,希望你能帮我一把;)
我有一个angular-cli项目,处理与NPM的依赖关系,以及在VSTS上为托管代理构建的一些任务。
问题来自几天前(在它工作正常之前)并且NPM INSTALL命令不再起作用。我将附上所有信息,但首先,仅提一下,我已经尝试过的事情:
的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调试日志
(我认为对日志错误很重要)
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.<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 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'.
整个npm调试文件非常繁重,但如果您认为它可以提供帮助,我会将其作为文件上传到另一台服务器以便下载。
最后,让我再说一次,这是在几天前工作,我改变我的依赖关系添加测试工具(茉莉,业力,protactor ......)然后它停止工作,现在甚至删除它们,仍然破坏。在本地,它在我的机器和另一台从未打开过项目的机器上工作(这意味着我在本地没有任何东西可以使项目仅在我的环境中工作)
最后2,该命令未通过NPM INSTALL,如果我修复了那个,其余步骤应该没问题
提前感谢您的时间,非常感谢。
答案 0 :(得分:1)
我在查看VSTS历史记录后发现问题,检查差异并逐个删除库,看看是什么打破了VSTS上的构建而不是本地。
该版本4.0.9中的 protactor ,它负责使用某些子依赖项来破坏构建。我将向他们的团队报告,只是为了让他们现在为将来的版本。
希望这会帮助那些人:)
Protactor存储库问题:here