electron

How to integrate Electron to WebStorm having no “Module is not installed” hint?

走远了吗. 提交于 2019-12-10 23:34:44
问题 My Electron project works just fine. But I can't go to the declaration of the electron plugin and I can't figure out how to solve that. Basically I just wanna get rid of that hint shown in the image below and instead being able to go to it's declaration. Module is not installed... Unresolved function or method... Thanks. 回答1: You'll need to install TypeScript type definitions for Electron, the first section of this blog post explains how to setup code completion for ReactJS in WebStorm: To

Argv[1] returns unexpected value when I open a file on double click in Electron app

删除回忆录丶 提交于 2019-12-10 21:53:32
问题 I am trying to open a file on double click. The file is being built for the Mac App Store using electron-packager. I have things set up so that my electron app opens when the file is double clicked, however the filename of the double clicked file is not passed to the app in the command line parameters. The data being returned for argv[0] is the app path (as expected), and for argv[1] is something similar to -psn_0_857362. I was under the impressions argv[1] would be the path to the requested

How should i exclude all node_modules in electron-packager

喜欢而已 提交于 2019-12-10 20:25:12
问题 I'm using electron-packager for creating an electron.exe of my app. I need to exclude all node modules . I tried the following --ignore=node_modules The above is not working. Any idea how to exclude all folders/ remove node modules in final build. 回答1: If you install modules as devDependencies , they will all be pruned automatically before packaging. If you're using electron-builder you can define glob patterns as files in the config. In this case !**/node_modules/* will exclude all of node

WebRTC Screensharing in electron

ε祈祈猫儿з 提交于 2019-12-10 20:22:34
问题 We have a web app to which I'm building electron app by loading URL in browserWindow. But when i try to share the screen it will give me a popup saying Please install the janus webRTC screen sharing plugin and restart the browser. Please help ! 回答1: you need to implement your own desktop picker dialog in electron. See here 来源: https://stackoverflow.com/questions/48685507/webrtc-screensharing-in-electron

Using electron-usb with electron

自闭症网瘾萝莉.ら 提交于 2019-12-10 19:57:22
问题 I tried is to include electron-usb library into my electron-project. When I execute npm start with require('electron-usb') in my index.html file an error occurs in the console: Uncaught Error: The specified procedure could not be found. \\?\C:\Users\Me\Documents\GitHub\electron-quick-start-master\electron-quick-start-master\node_modules\electron-usb\build\Release\electron-v0.36-win32-x64\usb_bindings.node This error occurs in the file ELECTRON_ASAR.js Click here to see it What did I do wrong?

What's the proper way to require in Node.js?

人走茶凉 提交于 2019-12-10 19:19:07
问题 I'm just getting started with Node.js and Electron, and I've seen various ways both in the documentation and in example code on how to require modules. Specifically, I am trying to follow this tutorial. In this particular example, I think I am requiring app which is in electron . 1) In the tutorial, it has you do: var app = require('app') 2) In the electron-quick-start example, which is provided by Electron to help you get started, they have you do: const electron = require('electron') const

Electron Desktop Notifications not displaying on windows 10

╄→尐↘猪︶ㄣ 提交于 2019-12-10 19:08:51
问题 My electron app is not displaying desktop notifications on windows 10. Mac and Linux are working fine. I am using electron-packager to build. Documentation says "On Windows 10, a shortcut to your app with an Application User Model ID must be installed to the Start Menu." so i call app.setAppUserModelId(myID) in main.js and i put a shortcut to the .exe inside C:\Users\sam\AppData\Roaming\Microsoft\Windows\Start Menu\Programs Still no notifications. I'm not sure which step I am doing wrong. 回答1

node js - How do I create build for commercial usage?

笑着哭i 提交于 2019-12-10 18:06:13
问题 I am working on node js application and it is now ready to use. I want to make exe of this application so that it can be used for commercial usage. Up to now I have used enclose module using which I have compiled the code of application but I have found some issues in that (app got crash on idle condition). App is running good without enclose or compiled code. I have searched on google and found some alternate modules like JXcore, Node webkit and Electron etc. but JX core giving error same as

OAuth2 with Desktop Application Security

纵然是瞬间 提交于 2019-12-10 17:57:17
问题 I have an Electron application that's basically a Google Drive client. I am planning to use OAuth 2. However, Google API requires me to register my application where a client_secret is generated. Since this is a desktop application, I have my client_secret stored in a server. The authentication URL is generated in the server and sent to the user. I'm worried that people can pretend to be the app and do things on behalf of my client_secret. If someone with malicious intent creates an

Electron - jQuery Errors

。_饼干妹妹 提交于 2019-12-10 16:13:10
问题 I'm working on an Electron project, and when attempting to include jQuery, I get this error: C:\Users\Matthew\Documents\Electron\ElectronProjects\Iris\js\jquery.min.js:4 Uncaught SyntaxError: C:\Users\Matthew\Documents\Electron\ElectronProjects\Iris\js\jquery.min.js:4 b),b&&a.jQuery===n&&(a.jQuery=Hb),n},b||(a.jQuery=a.$=n),n});jQuery v3.0.0-pre I'v attempted to use the way that was recommended in the Electron issues page (window.$ = window.jQuery = require('./../js/jquery.min.js');). It