electron

Electron JS install error - Error: EACCES: permission denied

南楼画角 提交于 2020-12-26 04:02:48
问题 getting error while installing ElectronJS, Error: Error: EACCES: permission denied, mkdir '/usr/lib/node_modules/electron/.electron' command tried, sudo npm install -g electron sudo npm install -g electron-prebuilt how to resolve this permission issue? 回答1: You can try with the following command sudo npm install -g electron --unsafe-perm=true --allow-root i hope it will be work 回答2: Solved my issue by appending --unsafe-perm=true command: sudo npm install -g electron --unsafe-perm=true unsafe

JavaScript基本介绍

孤人 提交于 2020-12-23 03:16:26
什么是JavaScript? JavaScript 是一种 直译式 脚本语言,一种 轻量级 的 脚本语言 。 什么是脚本语言? Script language 指的是它不具备开发操作系统的能力,而是只用来编写控制其他程序的 语言 。 JavaScript 是一种 嵌入式(embedded) 语言。它本身提供的核心语法并不是很多,更多的功能需要依靠 宿主环境(host) 提供。So,这门语言适合嵌入更大型的应用程序环境中,去调用宿主环境提供的底层 API 。 目前常见的 JavaScript 宿主环境有 浏览器 和 服务器环境Node 。 如果从 语法 的层面来看, JavaScript 是一门 对象模型语言 。各种宿主环境通过这个模型,描述自己的功能和操作接口,从而通过 JavaScript 控制这些功能。 同时, JavaScript 还支持 函数式编程 。所以在学习的过程中,我们需要更多的去了解和学习一些不同解决问题的方法。 JavaScript 的核心语法部分包括 基本语法构造 和 标准库 ,当然如果学习这门语言还需要学习不同的 宿主环境 提供的一些其他 API [这种API通常情况下只能在该宿主环境下使用],从而在需要的时候方便调用。 例如经常涉及的宿主环境 浏览器 ,它提供的额外的 API 可以分成三大类: 浏览器控制类:操作浏览器 DOM类: 操作网页的各种元素

Why is there a mismatch of module versions between Electron and Node.JS?

北慕城南 提交于 2020-12-15 07:53:31
问题 I have a node project in which I use NodeJS 14.15.0 and the latest build of Electron 12.0.0 . NodeJS version 14.15.0 has a NODE_MODULE_VERSION 83 according to their webpage. Electron version v12.0.0 uses this node version of 14.15.0 . but on their webpage it says the module NODE_MODULE_VERSION is 87 Therefore I have a mismatch between these two versions. I need a match so I can load the same binary intro an Electron app + execute by a node.js instance. 回答1: Electron maintains and compiles

Text is not changing on screen when using ipcRenderer.on() inside mounted() OR created() VueJs+Electron

ぐ巨炮叔叔 提交于 2020-12-15 04:31:05
问题 Hi i am using electron+vuejs and trying to receive data from electron's main process .That is some data is sent from main process to renderer process.And inside the renderer process i have ipcRenderer.on() in created() or mounted().But the data is not received there.And the text is not updated on the screen.My code is like shown below:Note even if i use mounted() it is not working .What am i doing wrong?How can i resolve this ? <div>{{logText}}</div> data(){ return { logText:'' } }, created()

前端Q给大家送双十二福利来了

折月煮酒 提交于 2020-12-14 22:41:17
由于公众号文章的推送规则已经改成了不按照发布时间排序,所以为了大家能够准时收到我的文章推送,请记得猛戳右下角的「在看」,并点击公号主页右上角的“ ... ”将 前端Q 设为星标~这样就不会错过每一篇精彩的推送啦~ 福利来袭: 奖品如下: 超萌短鹅+winty签名熊猫明信片x3 现金红包38.8x1 《Electron》实战实体书 x1 点本文「在看」,送随机红包一份 x5( 随机抽取5位) 主要是为了感谢大家对前端Q的支持,给大家送福利来了。 本次活动,仅限前端Q的粉丝且从事IT行业的参与(公众号号主参与无效),开奖前没有关注 前端Q 公众号的视为无效哈~ 参与方式: 公众号后台回复 1212 或扫下面的二维码 开奖时间 : 2020年12月13号 星期天 20:00 领奖方式 : 开奖后可联系我 加群福利: 若开奖后中奖的人在前端Q技术交流群则可另外获得随机红包一个~,扫下面的二维码回复 加群 即可加入技术群哦 最后 欢迎加我微信(winty230),拉你进技术群,长期交流学习... 欢迎关注「前端Q」,认真学前端,做个有专业的技术人... 在看点这里 本文分享自微信公众号 - 前端Q(luckyWinty)。 如有侵权,请联系 support@oschina.cn 删除。 本文参与“ OSC源创计划 ”,欢迎正在阅读的你也加入,一起分享。 来源: oschina 链接:

Incorrect NODE_MODULE_VERSION when using ava

≯℡__Kan透↙ 提交于 2020-12-13 03:51:53
问题 I write an Electron app that uses nodegit. For my test part I use ava in combination with Spectron to test my app. All of my tests work - including functions which use nodegit in my app. In addition to the tests described above I made also a pure non-Electron test file in which I import nodegit directly. import * as nodegit from 'nodegit'; Executing this test now via ava returns this: node_modules\.pnpm\nodegit@0.27.0\node_modules\nodegit\build\Release\nodegit.node' was compiled against a

Incorrect NODE_MODULE_VERSION when using ava

淺唱寂寞╮ 提交于 2020-12-13 03:49:25
问题 I write an Electron app that uses nodegit. For my test part I use ava in combination with Spectron to test my app. All of my tests work - including functions which use nodegit in my app. In addition to the tests described above I made also a pure non-Electron test file in which I import nodegit directly. import * as nodegit from 'nodegit'; Executing this test now via ava returns this: node_modules\.pnpm\nodegit@0.27.0\node_modules\nodegit\build\Release\nodegit.node' was compiled against a

Incorrect NODE_MODULE_VERSION when using ava

强颜欢笑 提交于 2020-12-13 03:49:25
问题 I write an Electron app that uses nodegit. For my test part I use ava in combination with Spectron to test my app. All of my tests work - including functions which use nodegit in my app. In addition to the tests described above I made also a pure non-Electron test file in which I import nodegit directly. import * as nodegit from 'nodegit'; Executing this test now via ava returns this: node_modules\.pnpm\nodegit@0.27.0\node_modules\nodegit\build\Release\nodegit.node' was compiled against a

How to Change ElectronJS App default Icon?

…衆ロ難τιáo~ 提交于 2020-12-08 10:58:31
问题 I am new to electronjs. I want to convert an angular app to desktop. I could achieve it successfully but the problem is that the app icon is set to default electron and not the icon I provided as follows: win = new BrowserWindow({ width: 600, height: 670, icon: `${__dirname}/dist/assets/imgs/logo.png` }) I changed the icon after building the app using resource hacker but what I need is to change it at build time in the correct way. what am I missing> 回答1: In main.js, specify icon win = new