question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error: Cannot find module 'electron'

See original GitHub issue

Related to https://github.com/plotly/orca/pull/73

Step to reproduce

conda install -y -c conda-forge plotly-orca==1.3.1

Running orca --help gives the following error:

internal/modules/cjs/loader.js:955
  throw err;
  ^

Error: Cannot find module 'electron'
Require stack:
- /opt/conda/lib/node_modules/orca/bin/orca.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:952:15)
    at Function.Module._load (internal/modules/cjs/loader.js:835:27)
    at Module.require (internal/modules/cjs/loader.js:1012:19)
    at require (internal/modules/cjs/helpers.js:72:18)
    at Object.<anonymous> (/opt/conda/lib/node_modules/orca/bin/orca.js:5:84)
    at Module._compile (internal/modules/cjs/loader.js:1123:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1143:10)
    at Module.load (internal/modules/cjs/loader.js:972:32)
    at Function.Module._load (internal/modules/cjs/loader.js:872:14)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [ '/opt/conda/lib/node_modules/orca/bin/orca.js' ]
}

I also tried to conda install electron without success.

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:1
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
nicolaskruchtencommented, Jan 4, 2021

I’ll just mention that we’re basically replacing Orca with the new Kaleido project (https://github.com/plotly/Kaleido) which is significantly easier to install (i.e. it works with just pip!) and is our new recommended way forward for static image export 😃

0reactions
SunidhiGaonkarcommented, Apr 18, 2022

Hi, I am facing the same issue, running orca --help gives the following error:

internal/modules/cjs/loader.js:626
    throw err;
    ^

Error: Cannot find module 'electron'
Require stack:
- /root/miniconda/lib/node_modules/orca/bin/orca.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:623:15)
    at Function.Module._load (internal/modules/cjs/loader.js:527:27)
    at Module.require (internal/modules/cjs/loader.js:681:19)
    at require (internal/modules/cjs/helpers.js:16:16)
    at Object.<anonymous> (/root/miniconda/lib/node_modules/orca/bin/orca.js:5:84)
    at Module._compile (internal/modules/cjs/loader.js:774:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:785:10)
    at Module.load (internal/modules/cjs/loader.js:641:32)
    at Function.Module._load (internal/modules/cjs/loader.js:556:12)
    at Function.Module.runMain (internal/modules/cjs/loader.js:837:10) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [ '/root/miniconda/lib/node_modules/orca/bin/orca.js' ]
}

I have already installed ‘electron’ and for the command conda install -c plotly plotly-orca==1.3.1 I get the following output:

Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Collecting package metadata (repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.

PackagesNotFoundError: The following packages are not available from current channels:

  - plotly-orca==1.3.1

Current channels:

  - https://conda.anaconda.org/plotly/linux-ppc64le
  - https://conda.anaconda.org/plotly/noarch
  - https://repo.anaconda.com/pkgs/main/linux-ppc64le
  - https://repo.anaconda.com/pkgs/main/noarch
  - https://repo.anaconda.com/pkgs/r/linux-ppc64le
  - https://repo.anaconda.com/pkgs/r/noarch

To search for alternate channels that may provide the conda package you're
looking for, navigate to

    https://anaconda.org

and use the search bar at the top of the page.

so I had installed orca with conda install -y -c conda-forge plotly-orca==1.3.1 Is it possible to sync the orca from conda-forge package with plotly package?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cannot find module 'electron' - node.js - Stack Overflow
js app that's using the "0.34.3" version of Electron. The problem that I'm having is that when I try to include the 'electron'...
Read more >
Getting "Cannot find module" error in Electron render process ...
I am trying to set up Parcel in my Electron + React project. I have Parcel set up so that I get all...
Read more >
@electron/remote - npm
@electron/remote is an Electron module that bridges JavaScript objects from the main process to the renderer process.
Read more >
Electron: Cannot find module 'app' - 7th Zero
App threw an error during load. Error: Cannot find module 'app' at Module._resolveFilename (module. · App threw an error when running [TypeError: ...
Read more >
Native Node Modules | Electron
Otherwise, you will get the following class of error when you try to run ... native Node modules against a custom build of...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found