Skip to content

__dirname is undefined #136

Description

@customautosys

Hi, I'm trying to use @electron/remote in an electron 17.2.0 app, and I'm getting this error.

Uncaught (in promise) ReferenceError: __dirname is not defined
    at node_modules/electron/index.js (index.js:4:28)
    at __require (chunk-PWNRNYY6.js?v=91a6c1a2:23:50)
    at node_modules/@electron/remote/dist/src/common/type-utils.js (type-utils.js:4:20)
    at __require (chunk-PWNRNYY6.js?v=91a6c1a2:23:50)
    at node_modules/@electron/remote/dist/src/renderer/remote.js (remote.js:5:22)
    at __require (chunk-PWNRNYY6.js?v=91a6c1a2:23:50)
    at node_modules/@electron/remote/dist/src/renderer/index.js (index.js:15:14)
    at __require (chunk-PWNRNYY6.js?v=91a6c1a2:23:50)
    at node_modules/@electron/remote/renderer/index.js (index.js:1:18)
    at __require (chunk-PWNRNYY6.js?v=91a6c1a2:23:50)

Anyone know how to solve this? It's using Quasar CLI with Vite (https://quasar.dev)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    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