electron

Unable to build with electron-packager within electron-forge

做~自己de王妃 提交于 2021-02-08 20:37:00
问题 I have created a default project with electron-forge. When I try to package my project with the command electron-forge , the process exits with the following error. What am I doing wrong? I followed the instructions to a tee at electron-forge. $ electron-forge package ✔ Checking your system ✔ Preparing to Package Application for arch: x64 ✔ Compiling Application ✔ Preparing native dependencies ⠦ Packaging Application An unhandled rejection has occurred inside Forge: Command failed: npm prune

Unable to build with electron-packager within electron-forge

爱⌒轻易说出口 提交于 2021-02-08 20:32:21
问题 I have created a default project with electron-forge. When I try to package my project with the command electron-forge , the process exits with the following error. What am I doing wrong? I followed the instructions to a tee at electron-forge. $ electron-forge package ✔ Checking your system ✔ Preparing to Package Application for arch: x64 ✔ Compiling Application ✔ Preparing native dependencies ⠦ Packaging Application An unhandled rejection has occurred inside Forge: Command failed: npm prune

fs.existsSync is not a function when used in electron

烈酒焚心 提交于 2021-02-08 15:12:46
问题 I am using Angular 10 , Electron 10.0 and electron-builder v22.8.0 . When starting my Electron app, I receive the following error in the console: fs.existsSync is not a function when used in electron getElectronPath @ ./node_modules/events/events.js:6 <anonymous> @ ./node_modules/events/events.js:17 ./node_modules/electron/index.js @ ./node_modules/events/events.js:19 __webpack_require__ @ ./webpack/bootstrap:79 ./src/app/projectview/new/new.component.ts @ ./src/app/projectview/new/new

fs.existsSync is not a function when used in electron

瘦欲@ 提交于 2021-02-08 15:11:18
问题 I am using Angular 10 , Electron 10.0 and electron-builder v22.8.0 . When starting my Electron app, I receive the following error in the console: fs.existsSync is not a function when used in electron getElectronPath @ ./node_modules/events/events.js:6 <anonymous> @ ./node_modules/events/events.js:17 ./node_modules/electron/index.js @ ./node_modules/events/events.js:19 __webpack_require__ @ ./webpack/bootstrap:79 ./src/app/projectview/new/new.component.ts @ ./src/app/projectview/new/new

Type not asignable (TypeScript 4.1.2)

别等时光非礼了梦想. 提交于 2021-02-08 08:54:26
问题 I'm using this piece of code from an old project (typescript 2) but it's not working with typescript 4.1.2. I'm trying to handle click events on desktop notification from an electron app (renderer process): const nativeNotification = window.Notification; const ProxyNotification = (title: any, options: any) => { const mirrorNotification = new nativeNotification(title, options); mirrorNotification.onclick = () => { // Handle click event. }; }; ProxyNotification.permission = nativeNotification

Type not asignable (TypeScript 4.1.2)

孤街浪徒 提交于 2021-02-08 08:54:01
问题 I'm using this piece of code from an old project (typescript 2) but it's not working with typescript 4.1.2. I'm trying to handle click events on desktop notification from an electron app (renderer process): const nativeNotification = window.Notification; const ProxyNotification = (title: any, options: any) => { const mirrorNotification = new nativeNotification(title, options); mirrorNotification.onclick = () => { // Handle click event. }; }; ProxyNotification.permission = nativeNotification

electron how to create delta file

孤人 提交于 2021-02-08 04:59:26
问题 I use electron-builder to build my app and succeed to build the first version which contains three outputs: foosetup.exe, foo-0.0.1-full.nupkg and RELEASES.Now I want to implement the auto-update and I have deployed a back-end service by using electron-release-server . The auto-update need to set a feedURL which will be used to fetch updates,but the problem is that I don't know what the updates exactly means?Is it the foo-0.0.1-full.nupkg or the foo-0.0.1-delta.nupkg or another file? The

electron how to create delta file

为君一笑 提交于 2021-02-08 04:59:24
问题 I use electron-builder to build my app and succeed to build the first version which contains three outputs: foosetup.exe, foo-0.0.1-full.nupkg and RELEASES.Now I want to implement the auto-update and I have deployed a back-end service by using electron-release-server . The auto-update need to set a feedURL which will be used to fetch updates,but the problem is that I don't know what the updates exactly means?Is it the foo-0.0.1-full.nupkg or the foo-0.0.1-delta.nupkg or another file? The

Adding external javascript file in javascript [duplicate]

南楼画角 提交于 2021-02-08 04:36:14
问题 This question already has answers here : How do I include a JavaScript file in another JavaScript file? (62 answers) Closed 3 years ago . I am writing an Electron program and want to use some javascript classes in the main process. I would prefer to have those classes in different files and include them inside of the script. I usually did this by just adding both, the script and the classes inside the html file but since it is the main process there is not html file. Question Is it possible

Configure electron-builder to run powershell script

懵懂的女人 提交于 2021-02-08 01:32:51
问题 I have an installation file created by electron-builder and faced issue that can't find a way how to run powershell script after installation. The idea is to make some changes in windows registry and set permission for application folder. As far as I understand it should be configured in build section in package.json . In api I found that it is exist afterPack method, but I can't figure it out how to execute powershell file through it. Thank you. 回答1: First, create an afterPack.js file,