Uploaded image for project: 'Apache Cordova'
  1. Apache Cordova
  2. CB-10136

error in cordova prepare (Platform API)

VotersWatch issueWatchersLinkUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    Description

      Add this in config.xml:

          <platform name="ios">
            <!-- ios restrictions -->
            <preference name="target-device" value="universal" />
          </platform>	
      

      Then run `cordova prepare`.

      You will get an error:
      "Error: Arguments to path.resolve must be strings"

      Log:

      $ cordova prepare --verbose
      Executing "before_prepare"  hook for all plugins.
      Searching PlatformJson files for differences between project vs. platform installed plugins
      No differences found between project and ios platform. Continuing...
      Generating config.xml from defaults for platform "ios"
      Wrote out iOS Bundle Identifier to "s.one"
      Wrote out iOS Bundle Version to "0.0.1"
      Error: TypeError: Arguments to path.resolve must be strings
          at Object.posix.resolve (path.js:439:13)
          at new pbxProject (/Users/shazron/Desktop/s/platforms/ios/cordova/node_modules/xcode/lib/pbxProject.js:17:26)
          at handleBuildSettings (/Users/shazron/Desktop/s/platforms/ios/cordova/lib/prepare.js:237:16)
          at updateProject (/Users/shazron/Desktop/s/platforms/ios/cordova/lib/prepare.js:163:12)
          at /Users/shazron/Desktop/s/platforms/ios/cordova/lib/prepare.js:47:16
          at _fulfilled (/Users/shazron/Desktop/s/platforms/ios/cordova/node_modules/q/q.js:787:54)
          at self.promiseDispatch.done (/Users/shazron/Desktop/s/platforms/ios/cordova/node_modules/q/q.js:816:30)
          at Promise.promise.promiseDispatch (/Users/shazron/Desktop/s/platforms/ios/cordova/node_modules/q/q.js:749:13)
          at /Users/shazron/Desktop/s/platforms/ios/cordova/node_modules/q/q.js:509:49
          at flush (/Users/shazron/Desktop/s/platforms/ios/cordova/node_modules/q/q.js:108:17)
      

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            shazron Shazron Abdullah
            shazron Shazron Abdullah
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment