最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - Electron non-context-aware native module in renderer - Stack Overflow

programmeradmin4浏览0评论

I have updated electron to latest in my project because there were some printer issues with that now I am facing this problem which is when I am importing packages to frontend it's throwing this error yet this works without any problems yet this bothers me so much I have searched and found this #1839 yet I can't find anything or i can't understand what should I do now I have tried

app.allowRendererProcessReuse = true;

it removes (in the command line) the errors but it stops working completely and throwing big error in frontend can anyone help me with this

(node:11484) Electron: Loading non-context-aware native module in renderer: '\?\C:\Users\admin\Desktop\co-electronupdate\node_modules@serialport\bindings\build\Release\bindings.node'. This is deprecated, see .

(node:11484) Electron: Loading non-context-aware native module in renderer: ''\?\C:\Users\admin\Desktop\co-electronupdate\node_modules@serialport\bindings\build\Release\bindings.node'. This is deprecated, see .

as you can see there is a big discussion going still I can't understand i have 2 quetions

  1. Should I ignore the error
  2. Is there any fix that I can do or should I continue with electron 7.xx

I have updated electron to latest in my project because there were some printer issues with that now I am facing this problem which is when I am importing packages to frontend it's throwing this error yet this works without any problems yet this bothers me so much I have searched and found this #1839 yet I can't find anything or i can't understand what should I do now I have tried

app.allowRendererProcessReuse = true;

it removes (in the command line) the errors but it stops working completely and throwing big error in frontend can anyone help me with this

(node:11484) Electron: Loading non-context-aware native module in renderer: '\?\C:\Users\admin\Desktop\co-electronupdate\node_modules@serialport\bindings\build\Release\bindings.node'. This is deprecated, see https://github.com/electron/electron/issues/18397.

(node:11484) Electron: Loading non-context-aware native module in renderer: ''\?\C:\Users\admin\Desktop\co-electronupdate\node_modules@serialport\bindings\build\Release\bindings.node'. This is deprecated, see https://github.com/electron/electron/issues/18397.

as you can see there is a big discussion going still I can't understand i have 2 quetions

  1. Should I ignore the error
  2. Is there any fix that I can do or should I continue with electron 7.xx
Share Improve this question asked Feb 7, 2020 at 4:04 Thalinda BandaraThalinda Bandara 1,0791 gold badge11 silver badges28 bronze badges
Add a comment  | 

2 Answers 2

Reset to default 14

finally, I found my answer if anyone curious about this here's the link

app.allowRendererProcessReuse = false

add this line to main.js

Following is the solution for now, until it can't be changed anymore!

// Make the following changes in main.js
app.whenReady(() => {
  app.allowRendererProcessReuse = false
})
发布评论

评论列表(0)

  1. 暂无评论