Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

process is not defined #115

Open
customautosys opened this issue Mar 3, 2022 · 2 comments
Open

process is not defined #115

customautosys opened this issue Mar 3, 2022 · 2 comments

Comments

@customautosys
Copy link

Hi, I'm trying to use require('@electron/remote'), but it fails upon startup with an error, process is not defined.

vue-router.esm-bundler.js:3295 ReferenceError: process is not defined
    at Object.622 (index.js:13:1)
    at __webpack_require__ (bootstrap:19:1)
    at Object.8005 (index.js:1:1)
    at __webpack_require__ (bootstrap:19:1)
    at Module.1868 (menu_main.vue?836c:105:2)
    at __webpack_require__ (bootstrap:19:1)
    at Module.7427 (app.vue?fc9b:156:2)
    at Function.__webpack_require__ (bootstrap:19:1)

It appears that this is at the portion of the @electron/remote code which checks process.type:

"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    o[k2] = m[k];
}));
var __exportStar = (this && this.__exportStar) || function(m, exports) {
    for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
};
Object.defineProperty(exports, "__esModule", { value: true });
if (process.type === 'browser')
    throw new Error(`"@electron/remote" cannot be required in the browser process. Instead require("@electron/remote/main").`);
__exportStar(require("./remote"), exports);
@sivanjali-pandranki
Copy link

Any resolution to this error?

@rynoV
Copy link

rynoV commented Jun 23, 2023

Seems like nodeIntegration and contextIsolation are breaking this https://stackoverflow.com/questions/66612493/process-is-not-defined-for-electrons-getting-started-app

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

No branches or pull requests

3 participants