VSTS-CI의 Cordova-iOS 빌드에서 "TypeError : "file"argument must be a non-empty string"오류가 발생했을 때의 해결 방법

환경


  • VSTS (Visual Studio Team Services) CI 서비스 (무료 플랜)
  • Agent: Hosted macOS Preview
  • Node.js: v8.9.3
  • cordova: v7.1.0
  • cordova-ios: 4.5.4

  • 오류 내용


    VSTS-CI에서 Cordova iOS 빌드를 실행하면 "TypeError : "file"argument must be a non-empty string"오류가 발생합니다.

    오류 로그 내용
    2018-04-05T09:54:52.1074750Z ##[section]Starting: Cordova Build ios
    2018-04-05T09:54:52.1134170Z ==============================================================================
    2018-04-05T09:54:52.1147800Z Task         : Cordova Build
    2018-04-05T09:54:52.1161490Z Description  : Build a hybrid app project based on the Cordova CLI, Ionic CLI, TACO CLI, or other Cordova-compliant CLI
    2018-04-05T09:54:52.1175080Z Version      : 1.3.11
    2018-04-05T09:54:52.1189080Z Author       : Microsoft Corporation
    2018-04-05T09:54:52.1203190Z Help         : [More Information](http://go.microsoft.com/fwlink/?LinkID=691186)
    2018-04-05T09:54:52.1217550Z ==============================================================================
    2018-04-05T09:54:52.7905950Z Input to determineIdentity: {"cwd":"/Users/vsts/agent/2.131.0/work/1/s","unlockDefaultKeychain":false,"defaultKeychainPassword":"","p12":"/Users/vsts/agent/2.131.0/work/1/s/keys/ios/ios_development.p12","p12pwd":"******"}
    2018-04-05T09:54:52.7985870Z TypeError: "file" argument must be a non-empty string
    2018-04-05T09:54:52.8001100Z     at normalizeSpawnArguments (child_process.js:383:11)
    2018-04-05T09:54:52.8014630Z     at spawnSync (child_process.js:519:38)
    2018-04-05T09:54:52.8030420Z     at /Users/vsts/agent/2.131.0/work/_tasks/CordovaBuild_70e94267-15dc-434d-8973-023d766825d7/1.3.11/lib/xcode-task-utils.js:45:31
    2018-04-05T09:54:52.8048720Z     at _fulfilled (/Users/vsts/agent/2.131.0/work/_tasks/CordovaBuild_70e94267-15dc-434d-8973-023d766825d7/1.3.11/node_modules/q/q.js:854:54)
    2018-04-05T09:54:52.8067550Z     at self.promiseDispatch.done (/Users/vsts/agent/2.131.0/work/_tasks/CordovaBuild_70e94267-15dc-434d-8973-023d766825d7/1.3.11/node_modules/q/q.js:883:30)
    2018-04-05T09:54:52.8083360Z     at Promise.promise.promiseDispatch (/Users/vsts/agent/2.131.0/work/_tasks/CordovaBuild_70e94267-15dc-434d-8973-023d766825d7/1.3.11/node_modules/q/q.js:816:13)
    2018-04-05T09:54:52.8097860Z     at /Users/vsts/agent/2.131.0/work/_tasks/CordovaBuild_70e94267-15dc-434d-8973-023d766825d7/1.3.11/node_modules/q/q.js:877:14
    2018-04-05T09:54:52.8114090Z     at runSingle (/Users/vsts/agent/2.131.0/work/_tasks/CordovaBuild_70e94267-15dc-434d-8973-023d766825d7/1.3.11/node_modules/q/q.js:137:13)
    2018-04-05T09:54:52.8136430Z     at flush (/Users/vsts/agent/2.131.0/work/_tasks/CordovaBuild_70e94267-15dc-434d-8973-023d766825d7/1.3.11/node_modules/q/q.js:125:13)
    2018-04-05T09:54:52.8161640Z     at _combinedTickCallback (internal/process/next_tick.js:131:7)
    2018-04-05T09:54:52.8278070Z ##[error]Task failed
    2018-04-05T09:54:52.8687900Z ##[section]Finishing: Cordova Build ios
    

    원인


    Microsoft/vsts-cordova-tasks 버그 같은.
    GitHub (htps : // 기주 b. 코 m / 미 c 로소 ft / vsts)도 Issues가 오르고 있었지만 현재 해결되지 않았습니다. 다만, Node.js v7.x 로 동작했다고 하는 정보가 실려 있었다.

    대응


    VSTS-CI의 Node.js 버전을 v8.9.3에서 v6.14.1로 변경했습니다.
    원래 초기값은 v6이므로, 변경하고 있지 않으면 이 에러는 발생하지 않는다.

    좋은 웹페이지 즐겨찾기