Error on `quasar build --mode electron --target win32`

  • I was just playing around with Quasar to see if I liked it and wanted to test the out-of-the-box support for Electron. I fired up a new app and immediately had errors:

    $> npm install -g @quasar/cli
    $> quasar create test-app
    $> cd test-app
    $> quasar build --mode electron --target win32

    I made no changes to the starting code. After the long build process, I was met with this error:

     app:electron Bundling app with electron-packager... +3ms
    (node:21956) UnhandledPromiseRejectionWarning:   TypeError: Cannot read property 'version' of undefined
      - index.js:119 Promise
      - new Promise
      - index.js:112 Promise.then.then
      - next_tick.js:68 process._tickCallback
    (node:21956) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)
    (node:21956) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

    I was able to accidentally resolve this error by installing Jest:

    $> quasar ext add @quasar/testing
    (select only Jest, and configure however you want)
    $> quasar build --mode electron --target win32

    I haven’t done exhaustive testing. Maybe you can install any testing framework and it fixes it. Maybe you can install any app extension and it fixes it (not just testing frameworks). Maybe running any non-build quasar command before running quasar build fixes it. Whatever the case, the error goes away after installing Jest.

Log in to reply