You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Some little problems trying to use native modules...
drivelist
Native module drivelist (or one of its deps) appears to use eval(). Changing the Content-Security-Policy as is fixes the problem, but we don't want this:
The drivelist native module has to be rebuilt: electron-rebuild can do that, but it places the drivelist.node build file in node_modules/drivelist/build/darwin-x64-64/drivelist.node and the dev electron doesn't look there so do not find the file.
Manually copying it in one of the searchpath (eg. build/) fixes the problem.
On Windows, the module has first to be rebuilt using:
npm install --save-dev electron-rebuild
# Every time you run "npm install", run this
./node_modules/.bin/electron-rebuild
# On Windows if you have trouble, try:
.\node_modules\.bin\electron-rebuild.cmd
And then the file found inside node_modules\drivelist\bin\win32-x64-64\drivelist.node has to be copied into build.
electron-rebuild (packaged mode)
Built app won't include the built native module and at runtime, following error will appear:
Uncaught (in promise) TypeError: Cannot read property 'indexOf' of undefined
The problem appears to be in bindings or electron-builder, I'm not sure where to look.
Some little problems trying to use native modules...
drivelist
Native module drivelist (or one of its deps) appears to use eval(). Changing the Content-Security-Policy as is fixes the problem, but we don't want this:
electron-rebuild (dev mode)
The drivelist native module has to be rebuilt: electron-rebuild can do that, but it places the
drivelist.node
build file innode_modules/drivelist/build/darwin-x64-64/drivelist.node
and the dev electron doesn't look there so do not find the file.Manually copying it in one of the searchpath (eg. build/) fixes the problem.
On Windows, the module has first to be rebuilt using:
And then the file found inside
node_modules\drivelist\bin\win32-x64-64\drivelist.node
has to be copied intobuild
.electron-rebuild (packaged mode)
Built app won't include the built native module and at runtime, following error will appear:
The problem appears to be in
bindings
orelectron-builder
, I'm not sure where to look.Bug opened in bindings: TooTallNate/node-bindings#54
Update: the problem is actually related to the webpack's optimizer that strips some code. See: TooTallNate/node-bindings#61 (comment)
The text was updated successfully, but these errors were encountered: