Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

Electron 9 error message #133

Open
Sergey-Churilin opened this issue May 7, 2020 · 2 comments
Open

Electron 9 error message #133

Sergey-Churilin opened this issue May 7, 2020 · 2 comments

Comments

@Sergey-Churilin
Copy link

Description

I'm getting an error message in console Uncaught Error: Loading non-context-aware native module in renderer

If use a workaround provided by electron to be possible to use currently such modules, it replaces with warning: (node:15876) Electron: Loading non-context-aware native module in renderer
But in Electron 11 this workaround will be removed by Electron and usage of spellchecker module will be impossible

Steps to Reproduce

https://github.com/Sergey-Churilin/Electron-samples/tree/spellchecker-sample

  1. Run npm i
  2. Run npm start

Expected behavior:

No error or warnings in console, application should work

Actual behavior:

If not to use a workaround, application doesn't work correctly

Reproduces how often:

100%

Versions

Node version: 12.16.1

Additional Information

Discussions about how the issue can be solved: electron/electron#18397

Also during module installation I'm getting such warnings:
..\src\worker.cc(38): warning C4996: 'v8::Object::Set': was declared deprecated
[C:\Spellchecker-sample\Electron-samples\node_modules\spellchecker\build\spellchecker.vcxproj]
c:\users\me\appdata\local\node-gyp\cache\12.16.1\include\node\v8.h(3499): note: see declaration of 'v8::Object::Set'

@vladimiry
Copy link

See #130

@abnerlee
Copy link

From electron/electron#18397:

For lots of modules it's as easy as replacing NODE_MODULE with NAN_MODULE_WORKER_ENABLED. For modules that require cleanup, it can be more involved.

While #130 still uses NODE_MODULE, so I think #130 won't solve the (node:15876) Electron: Loading non-context-aware native module in renderer error

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants