-
-
Notifications
You must be signed in to change notification settings - Fork 41
Keytar #26
Description
Hi
A short background: I develop in Quasar for the web and then build it in electron mode to run as an executable. Everything is working fine in this regard. Now I want to add something specific only when running in electron mode.
To implement that feature, I need keytar. I npm installed it put things in place (I hope) but when running the application as web mode I see the following in the console:
Cannot open C:\Users\user\Downloads\portable\vscode\Projects\project\node_modules\keytar\build\Release\keytar.node: TypeError: Cannot read property 'dlopen' of undefined at Object.eval (keytar.node?3002:1)
and the line itself is
try {global.process.dlopen(module, "C:\Users\user\Downloads\portable\vscode\Projects\project\node_modules\keytar\build\Release\keytar.node"); } catch(e) {throw new Error('Cannot open ' + "C:\Users\user\Downloads\portable\vscode\Projects\project\node_modules\keytar\build\Release\keytar.node" + ': ' + e);}
Obviously global.process is undefined.
Any idea why global.process is undefined?
I put this in conf.js file
extendWebpack(cfg) {
cfg.module.rules.push({
enforce: "pre",
test: /.node$/,
loader: "node-loader",
});