Electron questions



  • Hi

    1. npm outdated shows me
    electron 7.2.4   7.2.4   8.2.5
    electron-devtools-installer    2.2.4   2.2.4   3.0.0
    

    Meaning current and wanted are the same but latest is higher. Should I upgrade to the latest one? If so, how? npm update doesn’t do it.

    I ask because when building with electron, I get the following:

    npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
    

    The build succeeded but maybe using the latest version is preferable.

    1. The executable size is 102MB. What options do I have to downsize an electron executable? I read about electrino https://medium.com/dailyjs/put-your-electron-app-on-a-diet-with-electrino-c7ffdf1d6297 and I wonder if it’s relevant to a quasar project and how it is built.

    2. When running the executable outside of dist/electron folder, I get the following when running it: 576f4f16-1e6b-4fe4-9849-6993fa277938-image.png
      Thanks



    1. electron is just bundled that high, if you want a smaller bundle and have time to learn new tech, then you can try tauri.

    2. I didn’t have issue like that, try deleting that folder and issue a build again.



  • A. Maybe this was missed: npm outdated shows same wanted and current for electron and electron-devtools-installer but latest is higher. npm update does not update to the latest so should I update? and if so, how? I ask because when I did electron build, I see the following:

    npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
    

    Also when I did npm install (see point 3 below), I saw the following

    npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
    npm WARN deprecated core-js@2.6.11: core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3.
    

    Is it something I should be aware of or ignore it?

    B. I guess there is a reason why electron was selected with quasar and not tauri, no? I read more about the reasons why electron executable is so high. well…

    C. I remove package.lock.json and node_modules and installed everything again from scratch. ran quasar build -m electron and while it is running from the dist/electron folder, when moving the exe outside of that folder, I get the message of missing ffmpeg.dll. I see several dll files inside dist/electron folder so I wonder why it’s not bundling them inside the exe in the first place. I guess those will be missed too.



  • This post is deleted!


  • This post is deleted!


  • After some more digging around, the solution was quasar.conf.js -> electron section

    electron: {
       bundler: "builder", << builder, not packager
    
       builder: {
          win: {
              target: "portable" <<< portable
          }
       },
    }
    

    With this configuration, the exe was around 78MB instead of 100MB and double clicking the exe runs the application from wherever it was.



  • OK, first obstacle down, a new one is up.
    Apparently the above configuration is using peexe (exe packer) to make the exe smaller.

    The problem? Usually anti viruses don’t like this kind of stuff and warn the user as if it’s a virus, though it’s not and It’s hard “fighting” those false positives so I wonder if there is an option to tell electron not to use such packer.

    If there’s a better forum to ask this question, please let me know but maybe there is someone here that can share from his own experience.
    Thanks


Log in to reply