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

Syntax error when browserifying cordova-plugin-file

    XMLWordPrintableJSON

Details

    Description

      When building a Cordova project that includes this plugin with the --browserify option, two syntax errors are raised:

      events.js:142
            throw er; // Unhandled 'error' event
            ^
      
      SyntaxError: 'return' outside of function (31:4) (while aliasify was processing /builds/youngcapital/youngcapital_mobile/plugins/cordova-plugin-file/www/requestFileSystem.js) while parsing file: /builds/youngcapital/youngcapital_mobile/plugins/cordova-plugin-file/www/requestFileSystem.js
      

      and:

      events.js:142
            throw er; // Unhandled 'error' event
            ^
      
      SyntaxError: 'return' outside of function (31:4) (while aliasify was processing /builds/youngcapital/youngcapital_mobile/plugins/cordova-plugin-file/www/resolveLocalFileSystemURI.js) while parsing file: /builds/youngcapital/youngcapital_mobile/plugins/cordova-plugin-file/www/resolveLocalFileSystemURI.js
      

      Steps to reproduce:

      cordova create hello com.example.hello HelloWorld
      cd hello
      cordova platform add android
      cordova plugin add cordova-plugin-file
      cordova prepare --browserify
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              alexbuijs Alex Buijs
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: