ipcMain / ipcRenderer with Quasar/Electron



  • Hi,

    i have wraped my quasar app with electron and i want to use the ipcmain and ipcrenderer process.

    now ich have my project folder where i run: quasar dev
    and my electron folder within my project folder where i also run: quasar dev

    in myproject/electron/src/main.js file i do this:
    const {ipcMain} = require(‘electron’)

    and in one of my components i want to us the ipcRenderer like this.
    const {ipcRenderer} = require(‘electron’)

    But this end´s in an error—>

    This dependency was not found:

    • electron in ./~/babel-loader/lib!./~/vue-loader/lib/selector.js?type=script&index=0!./src/modules/time/components/UserAction.vue

    To install it, you can run: npm install --save electron

    Any idea??



  • Main Problem is: How can i import electron (in particular ipcRenderer) into one of my vuejs components???

    npm install --save-dev electron in my main project folder seems to be ignored due to some settings?

    I saw there is a devDependency like “quasar-electron-app”:“file:electron” but dont know how to use this?



  • Same problem here. I was able to install electron by specifying the version, with the command below:

    npm install --save electron@1.7.9
    

    But later on the require statement, the module fails to load (ENOENT on /path.txt). So I’m not sure about the way to use it…



  • Got it from this post ! Come back with the provided quasar-electron-app and add the following line to the build/webpack.base.conf.js of your root directory

    target: 'electron-renderer'

Log in to reply
 

Looks like your connection to Quasar Framework was lost, please wait while we try to reconnect.