3 Replies Latest reply on Jul 11, 2017 5:43 AM by dwilmer

    ES6 Promise with Phonegap / Phonegap Build

    travkriel Level 1

      One of our clients wants to integrate push notifications into a basic app I've made for them using PhoneGap and PhoneGap Build to compile the app.

      Kumulos came very highly recommended and does indeed seem to meet all our requirements.

      The problem I'm having is getting their recommended ES6-Promise into the project in a manner that actually allows PhoneGap Build to compile and then run without an error.

      The rest of the process seems to be well documented at least.

      I've tried adding the plugin into my config.xml with NPM and Git:

      <gap:plugin spec="https://github.com/stefanpenner/es6-promise#v4.1.1" source="git" /> 


      <gap:plugin name="es6-promise" version="4.1.1" source="npm" /> 

      Both of these fail with an error message that they're missing part of the plugin.xml.

      Cannot find plugin.xml for plugin "1499707182560". Please try adding it again.

      I've also tried including the js file directly in the head of the page with and without various combinations and positioning of the below:

      <script src="es6-promise.js"></script>

      <script type="text/javascript">
           var Promise = require('es6-promise').Promise;

      Also no luck there. It compiles, but doesn't actually seem to do anything or breaks the app.

      Would anyone be able to point me in the right direction to get this ES6-Promise working?