Uncaught Error: @electron/remote is disabled for this WebContents
remote模块使用出错,出现
Uncaught Error: @electron/remote is disabled for this WebContents. Call require("@electron/remote/main").enable(webContents) to enable it.
at IpcMainImpl.<anonymous>
依据提示,需要在main.js中添加一行require("@electron/remote/main").enable(webContents) 语句,但如果直接加,会显示webContents is not defined 错误。
不能直接加,webContents前要加上定义好的变量名,如下图,webContents应替换为 mainWindow.webContents。
Uncaught Error: @electron/remote is disabled for this WebContents相关推荐
- 安装rebar时提示Uncaught error in rebar_core
2019独角兽企业重金招聘Python工程师标准>>> 按照教程安装rebar,从 https://github.com/rebar/rebar/ 下载编译好的版本(注:网上大多数都 ...
- Jenkins的错误“error fetching remote repo origin”的问题解决
Jenkins的错误"error fetching remote repo origin"的问题解决 参考文章: (1)Jenkins的错误"error fetching ...
- hdfs中Exception in createBlockOutputStream以及MapReduce中I/O error constructing remote block reader
问题描述 (1) windows电脑向aliyun进行hdfs api文件追加操作时出现下方错误: DEBUG [Thread-3] (DFSOutputStream.java:1503) - Con ...
- echarts.js:1136 Uncaught Error: Initialize failed: invalid dom.
1.错误描述 echarts.js:1136 Uncaught Error: Initialize failed: invalid dom. 2.错误原因 <!DOCTYPE html>& ...
- Jenkins报错Error fetching remote repo 'origin'真正解决办法
Jenkins build时报错Error fetching remote repo 'origin',网上大部分文章都说是git权限问题,其实并不是,造成这个问题的原因是Jenkins有个工作空间( ...
- JWPlayer Uncaught Error: Invalid SRT file
错误场景: JWPlayer 播放视频,添加了字幕和缩略图: 字幕为Srt格式: 1 00:00:00,000 --> 00:00:02,000 战略管理过程2 00:00:03,000 --& ...
- 解决Jenkins上git出现的“ERROR: Error fetching remote repo ‘origin‘”问题
解决Jenkins上git出现的"ERROR: Error fetching remote repo 'origin'"问题 参考文章: (1)解决Jenkins上git出现的&q ...
- Loading plugin Fxp\Composer\AssetPlugin\FxpAssetPlugin PHP Fatal error: Uncaught Error: Call to unde
在安装以之前必须得安装fxp插件,但是fxp差价安装时很容易出错.以上时我在Ubuntu系统下安装fxp时发现的问题.当船使用的是 composer global require "fxp/ ...
- index.tsx:19 Uncaught Error: A <Route> is only ever to be used as the child of <Routes> element, nev
今天做练习react路由出现错误,index.tsx:19 Uncaught Error: A is only ever to be used as the child of element, nev ...
最新文章
- matlab rank函数报错,Matlab signrank函数(Wilcoxon signed rank test)中的矛盾结果[重复]
- spark计算TF-IDF值(中文)
- Python的Tkinter点击按钮触发事件
- Qt安装vsaddin插件失败解决方案(vs、Qt、 vsaddin插件下载地址)
- 测试你C语言水平的十道题,挑战一下?
- Nacos版本升级1.1.3 >> 1.3.1 —>再升级至1.3.2
- 将张量用图像表示出来,取张量的某几维度然后展示为图像
- C语言课后习题(25)
- phpcms文章点击量统计方法
- 微信小程序 图片处理的几个样式
- c语言把鼠标变成别的图案,鼠标指针图案怎么换?换成自己喜欢的可以吗?
- 达尔豪西大学 计算机科学,西安大略大学和达尔豪西大学哪个好
- 中南大学计算机2020研究生分数线,中南大学2020年考研复试分数线已公布
- 公司app上架正规要求需要办理icp许可证
- python等待执行完毕 再继续执行_Python等待操作完成后再继续
- 知道IP入侵个人的电脑
- 2012年奇虎360校园招聘实习生笔试编程题
- BigDecimal 保留小数位
- 国标28181:接收设备注册
- 【O2O领域】外卖订餐APP用户端Axure原型作品(覆盖外卖APP主流功能)