2017-11-08 7 views
0

VSTS에서 코드 푸시 확장을 통해 릴리스를 푸는 동안 다음 오류가 발생하는 이유를 알 수 없습니다!VSTS를 통한 릴리스시 CODE-PUSH 오류

enter image description here

2017-11-17T09:13:07.6795222Z npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected]^1.0.0 (node_modules\chokidar\node_modules\fsevents): 
2017-11-17T09:13:07.6795222Z [email protected] d:\a\3\s 
2017-11-17T09:13:07.6795222Z `-- (empty) 
2017-11-17T09:13:07.6795222Z npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"}) 
2017-11-17T09:13:07.6795222Z 
2017-11-17T09:13:07.6835014Z npm WARN [email protected] No description 
2017-11-17T09:13:07.8445206Z npm WARN [email protected] No license field. 
2017-11-17T09:13:07.8465194Z npm ERR! Windows_NT 10.0.14393 
2017-11-17T09:13:07.8475041Z npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "cordova" 
2017-11-17T09:13:07.8475041Z npm ERR! node v6.10.0 
2017-11-17T09:13:07.8475041Z npm ERR! npm v3.10.10 
2017-11-17T09:13:07.8475041Z npm ERR! path d:\a\3\s\node_modules\cordova\node_modules\.bin\acorn.cmd 
2017-11-17T09:13:07.8475041Z npm ERR! code EEXIST 
2017-11-17T09:13:07.8475041Z 
2017-11-17T09:13:07.8475041Z npm ERR! Refusing to delete d:\a\3\s\node_modules\cordova\node_modules\.bin\acorn.cmd: ..\acorn\bin\acorn symlink target is not controlled by npm d:\a\3\s\node_modules\cordova\node_modules\acorn 
2017-11-17T09:13:07.8475041Z npm ERR! File exists: d:\a\3\s\node_modules\cordova\node_modules\.bin\acorn.cmd 
2017-11-17T09:13:07.8475041Z npm ERR! Move it away, and try again. 
2017-11-17T09:13:07.8475041Z 
2017-11-17T09:13:07.8475041Z npm ERR! Please include the following file with any support request: 
2017-11-17T09:13:07.8475041Z npm ERR!  d:\a\3\s\Client Components\Main\Source\vr9-11\npm-debug.log 
2017-11-17T09:13:07.8475041Z npm ERR! code 1 
2017-11-17T09:13:07.9305055Z ##[debug]load strings from: d:\a\_tasks\CodePushReleaseCordova_f5990527-f512-4c14-9f8e-1254240dc3cb\1.0.5\node_modules\vsts-task-lib\lib.json 
2017-11-17T09:13:07.9325060Z Unhandled: Command failed: npm install cordova 
2017-11-17T09:13:07.9325060Z ##[debug]load loc strings from: d:\a\_tasks\CodePushReleaseCordova_f5990527-f512-4c14-9f8e-1254240dc3cb\1.0.5\node_modules\vsts-task-lib\Strings\resources.resjson\en-US\resources.resjson 
2017-11-17T09:13:07.9325060Z ##[debug]task result: Failed 
2017-11-17T09:13:07.9365053Z ##[debug]Processed: ##vso[task.complete result=Failed;]Unhandled: Command failed: npm install cordova 

로그 다음과 같은 오류 로그를 빌드 정의에 "Build.SourceDirectory"으로라는 변수를 추가하고 취득 등 아래 솔루션의

시도 하나

enter image description here

파일은 다음 링크에서 볼 수 있습니다. https://drive.google.com/open?id=1OC49xlDOEQekO9gqdrj0NQCMPz8onTRX

Eddie가 ggested하고 (빌딩과 노드 모듈의 파일을 지우면서 생성 중), 다음과 같은 오류가 발생합니다.

2017-11-21T06:39:48.8214252Z ##[debug]Finished Building Command: node d:\a\_tasks\CodePushReleaseCordova_f5990527-f512-4c14-9f8e-1254240dc3cb\1.0.5\node_modules\code-push-cli\script\cli release-cordova "Syngenta_Visit_Report1" "android" --deploymentName "Staging" --rollout "100%" 
2017-11-21T06:39:48.8254247Z ##[debug]Attempting execution of command: node d:\a\_tasks\CodePushReleaseCordova_f5990527-f512-4c14-9f8e-1254240dc3cb\1.0.5\node_modules\code-push-cli\script\cli release-cordova "Syngenta_Visit_Report1" "android" --deploymentName "Staging" --rollout "100%" 
2017-11-21T06:39:49.6774368Z Running "cordova prepare" command: 
2017-11-21T06:39:49.6774368Z 
2017-11-21T06:39:49.6874306Z 'cordova' is not recognized as an internal or external command, 
2017-11-21T06:39:49.6904319Z operable program or batch file. 
2017-11-21T06:39:49.6924371Z [Error] Unable to prepare project. Please ensure that this is a Cordova project and that platform "android" was added with "cordova platform add android" 
2017-11-21T06:39:49.7014305Z ##[debug]Finished Building Command: node d:\a\_tasks\CodePushReleaseCordova_f5990527-f512-4c14-9f8e-1254240dc3cb\1.0.5\node_modules\code-push-cli\script\cli logout 
2017-11-21T06:39:50.5584321Z ##[debug]task result: Failed 
2017-11-21T06:39:50.5624318Z ##[debug]Processed: ##vso[task.complete result=Failed;]Command failed: release-cordova 
2017-11-21T06:39:50.5624318Z Command failed: release-cordova 

The Following error while trying for Eddie's solution

+0

어떤 문제 해결 단계가 당신을 위해 일한다을 확인하기 위해 빌드를 실행 지금까지 찍은거야? –

+0

당신이 사용하고 난 플랫폼에서 안드로이드 폴더를 삭제하려고했지만, 그 날 –

+0

위해 작동하지 않았다이 [CodePush] (https://marketplace.visualstudio.com/items?itemName=ms-vsclient.code-push# 개요) 확장? 또한 빌드 로그의 자세한 출력을 활성화하여 문제 해결을위한 자세한 정보를 얻을 수 있습니까? 어떻게이 튜토리얼을 따라하시기 바랍니다 : http://blog.devmatter.com/enabling-verbose-output-in-team-foundation-build-logs/ –

답변

0

먼저 당신이 체크 폴더에 어떤 파일이 없는지 확인 내부 폴더를 node_modules 호스트 된 에이전트가 파일을 삭제할 수 없으며 작업이 실패 할 수 있습니다. 호스팅 된 에이전트는 JSON 파일을 검사하여 자체적으로 필요한 파일을 다운로드합니다. CodePush 작업하기 전에이 작업을 추가하십시오 :

1) 명령을 추가,이 NPM 작업 후

https://drive.google.com/open?id=1H4bWAMruzfOs90xOLxgjadAd7DihaVH4

2) 설정과 NPM 작업 추가이 오류에 대한 트러블 슈팅을 위해

아래

https://drive.google.com/open?id=1bxd54kVgW4zGRwhsH_JKz_cjc1wYZ-No

설정과 라인 작업은 그 다음 Cordov 있는지 확인

$ (Build.SourcesDirectory)와 같은 \ 경로 앱에 당신이 변수 Build.SourceDirectory을 지정한 경우 명령은 다음 제대로

을 실행할 수 있습니다

이미 지정한로 (변수)를 제거 GET SOURCES의 경로

이 조건에서 "Build.SourceDirectory"변수를 추가 할 필요가 없습니다. 그리고 이제는 빌드 에이전트에 존재해서는 안되는 "d : \ a \ 3 \ s \ s \ app path"에 작업 디렉토리를 지정했지만 작업은 그 오류를보고하지 않았습니다.

"d : \ a \ 3 \ s \ app \ path"가 아닌 "d : \ a \ 3 \ s"아래에 파일이 있으므로 config.xml을 찾을 수 없다는 작업이 있습니다.

따라서 "Build.SourceDirectory"변수를 제거하고

위의 단계는 주어진 문제에 도움을

감사 에디 첸

1

작업 실행과 같은 Build.SourcesDirectory 폴더의 루트에서 명령을 "코르도바 준비" "D하십시오 \ 3 \의 \". 나는 당신의 코드 파일이 "d : \ a \ 3 \ s \ yourappname"과 같은 하위 폴더에 위치하여 프로젝트를 찾을 수 없다고 생각합니다. 그러나 태스크에서 프로젝트 디렉토리를 지정하는 옵션은 없습니다.

해결 방법으로

, 아래처럼 빌드 정의에서 "Build.SourceDirectory"로라는 이름의 변수를 추가 할 수 있습니다 enter image description here

+0

으로 질문을 편집 한 순환 참조가 발견되었습니다 단계에 대한 조건을 평가 :. '포스트 작업 정리 '변수 값에서 \ $으로 "" –

+0

은 내가 솔루션의 시행 내가 제거 @KrishnaLahoti 위의 솔루션 –

+0

을 시도 후 내가 가진 오류 로그와 질문을 업데이트했습니다. " –