Skip to content
This repository was archived by the owner on Apr 28, 2025. It is now read-only.
This repository was archived by the owner on Apr 28, 2025. It is now read-only.

Keytar #26

@ghost

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",
                });

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions