Notice: The Monaca & Onsen UI Community Forum is shutting down.

For Onsen UI bug reports, feature requests and questions, please use the Onsen UI GitHub issues page. For help with Monaca, please contact Monaca Support Team.

Thank you to all our community for your contributions to the forum. We look forward to hearing from you in the new communication channels.

JavaScript Import Error

  • Error caused by using “import” statements in JavaScript files. The error message from the monaca preview states “Uncaught SyntaxError: Unexpected token {”. Project loads fine when run in the browser, but still fails when debug build is run on Android or IOS.

    The project is using:

    • AngularJS
    • Cordova version 11.0.0

    Are JavaScript import statements not compatible with Monaca? Is there another way to accomplish the same functionality?
    Any advice is appreciated, thanks.