microsoft / vsts-cordova-tasks

Streamline CI setup for your Apache Cordova, PhoneGap, Ionic, or Cordova CLI compatible app using a set of useful pre-defined build steps for VS Team Services or TFS
http://go.microsoft.com/fwlink/?LinkID=691188
Other
25 stars 27 forks source link

Build errors for iOS when using Node 6.x and a Cordova plugin with a "framework" in it #52

Closed Chuxel closed 8 years ago

Chuxel commented 8 years ago

Cordova 6.1.1 and below do not fully support Node 6.0.0. You can run into build errors like the following after a Cordova plugin with a framework element is added. (A new empty project will not repro.

  1) ios project handler uninstallation of <framework> elements with custom="true" attribute should rm the file from the right target location
   Message:
     TypeError: Path must be a string. Received undefined
   Stacktrace:
     TypeError: Path must be a string. Received undefined
    at assertPath (path.js:7:11)
    at Object.dirname (path.js:697:5)
    at searchPathForFile (C:\Cordova\cordova-lib\cordova-lib\node_modules\xcode\lib\pbxProject.js:985:24)
    at pbxProject.removeFromFrameworkSearchPaths (C:\Cordova\cordova-lib\cordova-lib\node_modules\xcode\lib\pbxProject.js:711:20)
    at pbxProject.removeFramework (C:\Cordova\cordova-lib\cordova-lib\node_modules\xcode\lib\pbxProject.js:222:12)
    at Object.module.exports.framework.uninstall (C:\Cordova\cordova-lib\cordova-lib\src\plugman\platforms\ios.js:230:41)
    at .<anonymous> (C:\Cordova\cordova-lib\cordova-lib\spec-plugman\platforms\ios.spec.js:441:38)

Downgrade to the LTS version of Node.js (as of this writing 4.4.3) to resolve.