2017-03-06 2 views
0

다음과 비슷한 샘플 각도 2 앱을 빌드하려고합니다. https://github.com/angular/quickstart.git 빠른 시작.Jenkins의 Angular 2 App 빌드

이 프로젝트를 제 저장소에 복제했지만 Jenkins에 노드를 설치하는 것 외에 빌드를 성공적으로 수행하기 위해 수정할 수있는 사항이 무엇인지 확실하지 않습니다. 이 작업을 수행하기 위해 설치해야하는 종속성이 있습니까?

내가 실행중인 유일한 스크립트는 npm install이며 작업은 여전히 ​​실패하고 있습니다.

이것은 콘솔 결과 :

[EnvInject] - Loading node environment variables. 
Building remotely on r008p8p0c TPC (bxp2-prod linuxCleanUp) in workspace /bxp/jen/slave99/workspace/wmz-angular 
> /usr/bin/git rev-parse --is-inside-work-tree # timeout=10 
Fetching changes from the remote Git repository 
> /usr/bin/git config remote.origin.url https://git.url # timeout=10 
Fetching upstream changes from https://git.url 
> /usr/bin/git --version # timeout=10 
using GIT_ASKPASS to set credentials git 
> /usr/bin/git fetch --tags --progress https://git.url +refs/heads/*:refs/remotes/origin/* 
> /usr/bin/git rev-parse refs/remotes/origin/feature/ruth-3-6-17^{commit} # timeout=10 
> /usr/bin/git rev-parse refs/remotes/origin/origin/feature/ruth-3-6-17^{commit} # timeout=10 
Checking out Revision 61164adcfa55d6ee096b6969b8c043187ae1fa88 (refs/remotes/origin/feature/ruth-3-6-17) 
> /usr/bin/git config core.sparsecheckout # timeout=10 
> /usr/bin/git checkout -f 61164adcfa55d6ee096b6969b8c043187ae1fa88 
> /usr/bin/git rev-list 61164adcfa55d6ee096b6969b8c043187ae1fa88 # timeout=10 
[wmz-angular] $ /bxp/jen/slave99/tools/jenkins.plugins.nodejs.tools.NodeJSInstallation/NodeJS_0.12.9_v8/bin/node /tmp/hudson1546788266894720709.js 
/tmp/hudson1546788266894720709.js:1 
(function (exports, require, module, __filename, __dirname) { npm install 
                    ^^^^^^^ 
SyntaxError: Unexpected identifier 
    at exports.runInThisContext (vm.js:73:16) 
    at Module._compile (module.js:443:25) 
    at Object.Module._extensions..js (module.js:478:10) 
    at Module.load (module.js:355:32) 
    at Function.Module._load (module.js:310:12) 
    at Function.Module.runMain (module.js:501:10) 
    at startup (node.js:129:16) 
    at node.js:814:3 
Build step 'Execute NodeJS script' marked build as failure 
[BFA] Scanning build for known causes... 
[BFA] No failure causes found 
[BFA] Done. 0s 
Finished: FAILURE 
+1

NPM 모듈을 설치하기위한 스크립트, 그냥 명령을 nodejs 아닌가요? – lin

+0

Jenkins 작업을 올바르게 구성 했습니까? – playerone

+0

작업이 실패한 이유를 알지 못해서 당신을 도울 수 없을 것입니다. 질문을 업데이트하여 실패한 작업의 로그를 포함하십시오. – lax1089

답변

0

execute cmd/bash commands를 사용하여 명령을 실행합니다. Execute NodeJS script .js 파일이 node index.js처럼 실행될 것으로 기대합니다.

npm install 유효한 당신의 작업이 실패하는 동안 오류 메시지를 받았습니다

+0

감사합니다. 이로 인해 문제가 해결되었습니다. – user1324418