electron

ElectronJs: HellowWorld application is not starting

99封情书 提交于 2019-12-14 04:00:42
问题 I have started with electron js hello world application first application with electron I am doing exactly what is instructed. Created 3 files main.js, index.html, package.json package.json { "name" : "your-app", "version" : "0.1.0", "main" : "main.js" } main.js const electron = require('electron'); // Module to control application life. const {app} = electron; // Module to create native browser window. const {BrowserWindow} = electron; // Keep a global reference of the window object, if you

unable to import electron modules from the BrowserWindow page

十年热恋 提交于 2019-12-14 03:53:55
问题 I have a angular2/typescript application that I am having loaded into the electron BrowserWindow. The modules for this are loaded via SystemJS. But, when I run it via launching electron, I get an error from the SystemJS loader where it is trying to load the electron module from the file system. Does anyone have any recommendation as what I need to configure in SystemJS to map it such that it can find the electron module? I did not see any js to map to in electron-prebuilt. Update Added the

Angular 2's two-way binding not working on initial load of electron app

本秂侑毒 提交于 2019-12-14 01:31:13
问题 I have the following files: topnav.component.ts import { Component } from '@angular/core'; import { EnvironmentService } from '../services/ipc/environment.service'; const { ipcRenderer } = electron; @Component({ selector: 'app-topnav', templateUrl: './topnav.component.html', styleUrls: ['./topnav.component.scss'] }) export class TopnavComponent { version: string = null; constructor(private environmentService: EnvironmentService) { this.environmentService.getVersionInfo(); ipcRenderer.on(

No member named ForceSet

此生再无相见时 提交于 2019-12-14 01:17:37
问题 I'm playing with NodeJS and Electron. Using node 10.9.0 and boilerplate named electron-react-boilerplate . All of the NodeJS dependencies that I have installed were working correctly, but I need a native module to be installed. The boilerplate docs says to install native modules in the /app directory and so I did, but it threw me: ../src/binding.cc:619:11: error: no member named 'ForceSet' in 'v8::Object' target->ForceSet(Nan::New<v8::String>("endianness").ToLocalChecked(), Nan::New<v8:

Run electron app as admin windows

风流意气都作罢 提交于 2019-12-14 01:14:09
问题 I am writing an electron app that I need to run with admin access (like sudo).I haven't created any installer for that app. I know that I can write sudo electron . in linux to start my app as root but what about windows? Is there any similar command? 回答1: You can open Command Prompt as Administrator and then run the app via electron . 来源: https://stackoverflow.com/questions/45448049/run-electron-app-as-admin-windows

React Remote Console Logging

ぐ巨炮叔叔 提交于 2019-12-14 01:09:28
问题 I setup an Express Server with Mongo to record console logs during debug testing of an Electron app using React. I simply use ajax to send what I would normally print with console.log. This works fine with individual events I want logged, but how do I export the entire chrome style console as an object so that anything that would reach the console (example: webpack messages, messages from other components etc) would all be accessible as one object that I can do a POST on. Basically a way to

Bundled JS fails - MIME type ('text/html') is not executable, and strict MIME type checking is enabled

北战南征 提交于 2019-12-13 20:31:07
问题 I'm trying to set up a basic seed for an Angular / Electron app. I've worked it up from scratch based on a handful of guides and articles and it works fine whilst developing but fails when I go to build it. Project Source git clone https://popClingwrap@bitbucket.org/popClingwrap/angular-electron-seed.git If you do npm start then npm run electron at the same time in a second terminal the app will fire up fine in both a browser and then in an Electron app window. If you click the button on

Atom Electron - Detect Dev Tools ready

天大地大妈咪最大 提交于 2019-12-13 18:56:35
问题 This issue relates to Chromium/Node.js (Atom Electron, Node Webkit, etc) based apps and not Chrome browser based apps. When debugging the boot code of a program that uses Chromium and Node.js, there is a significant delay between the time that Dev Tools is invoked and it actually starts up fully, including the ability to execute break points. This means that in order to debug boot logic of an app, which occurs immediately after Dev Tools is invoked, inserted or stored breakpoints don't fire

WebRTC Video/Audio stream, but Audio is not playing

拈花ヽ惹草 提交于 2019-12-13 17:06:24
问题 I am working on an Electron app with React.js that sets up some peer connections through webRTC. Everything looks good with the connections and the peers receive the stream, but the video on the peers end does no play the audio. Perhaps I'm just not understanding how getUserMedia works, but I thought setting constraints true for audio and video was enough. Relavent HTML (Peer) <video ref="video" autoplay></video> A few snippets of the code getting the stream // constraints this.constraints =

TypeError: is not a constructor

蓝咒 提交于 2019-12-13 14:30:39
问题 I'm just using the code as a learning exercise regarding JavaScript classes. The code produces a "TypeError: SimpleLogger is not a constructor". The class seems to be exported Ok but I can't instantiate it in the main.js file. I've reduced the code to just show the issue. I was wondering if anyone can spot the problem. Thanks. // In simplelogger.js "use strict"; class SimpleLogger { constructor(level) { this.level = level || DEFAULT_LEVEL; } // .... other methods } const DEFAULT_LEVEL = 'info