Skip to content

require('electron').remote undefined #12889

@jefferybai

Description

@jefferybai
  • Electron Version: v 2.0.0
  • Operating System (Platform and Version): mac os, webpack, npm, vscode
  • Last known working Electron version: v 2.0.0

Actual behavior
A clear and concise description of what actually happened.

npm install electron

console.log(require('electron').remote)
//undefined

console.log(require.resolve('electron')) ////Users/baizhihui/Documents/job/Classflow_WEB/node_modules/_electron@2.0.0@electron/dist/Electron.app/Contents/Resources/electron.asar/browser/api/exports/electron.js

I found a solution on the official website.
But after running the following code.

npm uninstall electron
npm uninstall -g electron

Cannot find electron module

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions