electron

How to select file OR folder in file dialog

ε祈祈猫儿з 提交于 2021-02-06 09:12:09
问题 How would someone open up a file dialog in Node.js / electron to be able to select either a folder or a file. When I use <input type="file"/> it will open up the file dialog but won't allow me to select a folder. But when I try <input type="file" webkitdirectory/> it will open up the dialog, but won't allow for folder selection. What I want to do is just have one input button, or doesn't really have to be a button, but a way to launch the native system file explorer for both possibilities.

How do I move a frameless window in Electron without using -webkit-app-region

社会主义新天地 提交于 2021-02-05 20:28:29
问题 I've been trying to move a frameless window on false but now I want to move the whole window just by dragging one element (the title bar), I've tried -webkit-app-region: drag; but it doesn't seem to work, I've also tried https://www.npmjs.com/package/electron-drag but it does't work either. 回答1: Since your windows are frameless you can use the property -webkit-app-region which is valid even though your IDE says it's not. You just should forbid the text selection and drag on buttons inside of

How do I move a frameless window in Electron without using -webkit-app-region

我是研究僧i 提交于 2021-02-05 20:26:50
问题 I've been trying to move a frameless window on false but now I want to move the whole window just by dragging one element (the title bar), I've tried -webkit-app-region: drag; but it doesn't seem to work, I've also tried https://www.npmjs.com/package/electron-drag but it does't work either. 回答1: Since your windows are frameless you can use the property -webkit-app-region which is valid even though your IDE says it's not. You just should forbid the text selection and drag on buttons inside of

Electron: socket.io can receive but not emit

邮差的信 提交于 2021-02-05 20:19:10
问题 I'm creating an Electron application that uses Socket.io to communicate to a server application, but I'm experiencing a weird issue: whereas my Electron app successfully joins and receives messages from my server, it completely fails to emit anything. Client-side: const io = require('socket.io-client'); // ... var socket = io("http://localhost:8081"); socket.on('welcome', () => { console.log('welcome received'); // displayed socket.emit('test') }); socket.on('error', (e) => { console.log(e);

Electron: socket.io can receive but not emit

牧云@^-^@ 提交于 2021-02-05 20:18:37
问题 I'm creating an Electron application that uses Socket.io to communicate to a server application, but I'm experiencing a weird issue: whereas my Electron app successfully joins and receives messages from my server, it completely fails to emit anything. Client-side: const io = require('socket.io-client'); // ... var socket = io("http://localhost:8081"); socket.on('welcome', () => { console.log('welcome received'); // displayed socket.emit('test') }); socket.on('error', (e) => { console.log(e);

Electron: socket.io can receive but not emit

时间秒杀一切 提交于 2021-02-05 20:17:30
问题 I'm creating an Electron application that uses Socket.io to communicate to a server application, but I'm experiencing a weird issue: whereas my Electron app successfully joins and receives messages from my server, it completely fails to emit anything. Client-side: const io = require('socket.io-client'); // ... var socket = io("http://localhost:8081"); socket.on('welcome', () => { console.log('welcome received'); // displayed socket.emit('test') }); socket.on('error', (e) => { console.log(e);

Electron: socket.io can receive but not emit

烈酒焚心 提交于 2021-02-05 20:16:53
问题 I'm creating an Electron application that uses Socket.io to communicate to a server application, but I'm experiencing a weird issue: whereas my Electron app successfully joins and receives messages from my server, it completely fails to emit anything. Client-side: const io = require('socket.io-client'); // ... var socket = io("http://localhost:8081"); socket.on('welcome', () => { console.log('welcome received'); // displayed socket.emit('test') }); socket.on('error', (e) => { console.log(e);

Electron: socket.io can receive but not emit

£可爱£侵袭症+ 提交于 2021-02-05 20:16:30
问题 I'm creating an Electron application that uses Socket.io to communicate to a server application, but I'm experiencing a weird issue: whereas my Electron app successfully joins and receives messages from my server, it completely fails to emit anything. Client-side: const io = require('socket.io-client'); // ... var socket = io("http://localhost:8081"); socket.on('welcome', () => { console.log('welcome received'); // displayed socket.emit('test') }); socket.on('error', (e) => { console.log(e);

Electron: socket.io can receive but not emit

℡╲_俬逩灬. 提交于 2021-02-05 20:16:10
问题 I'm creating an Electron application that uses Socket.io to communicate to a server application, but I'm experiencing a weird issue: whereas my Electron app successfully joins and receives messages from my server, it completely fails to emit anything. Client-side: const io = require('socket.io-client'); // ... var socket = io("http://localhost:8081"); socket.on('welcome', () => { console.log('welcome received'); // displayed socket.emit('test') }); socket.on('error', (e) => { console.log(e);

Node module was compiled against diffferent node module 67

℡╲_俬逩灬. 提交于 2021-02-05 12:15:53
问题 I have a node project that was compiled under node module version 67, but now i am getting an error that it requires node module version 69. usb_bindings.node was compiled against a different Node.js version using NODE_MODULE_VERSION 67. This version of Node.js requires NODE_MODULE_VERSION 69. Please try re-compiling or re-installing the module (for instance, using `npm rebuild` or `npm install`).at process.module.(anonymous function) [as dlopen] Does anyone know how i could resolve this