Windows Package Cannot find module 'electron'
See original GitHub issueAfter building a package for windows via:
electron-packager ./ <appName> --platform=win32 --arch=x64 --version=0.33.7
When I try to run the exe located inside the build folder I get an error saying cannot find module ‘electron’
my folder structure looks like this if it makes a difference…
and my main process code looks like https://gist.github.com/tylerbourque/54714e5c5120583d1d0f
Issue Analytics
- State:
- Created 8 years ago
- Comments:13 (5 by maintainers)
Top Results From Across the Web
Electron-packager: cannot find module - Stack Overflow
Two things you can try: Make sure every node modules that you need to run on production build added into dependencies in package.json....
Read more >electron-winstaller - npm
Module to generate Windows installers for Electron apps. Latest version: 5.1.0, last published: 2 months ago.
Read more >Common Configuration - electron-builder
Defaults to true if electron-compile in the dependencies. And false if in the devDependencies or doesn't specified. electronDist String | module:app-builder- ...
Read more >cannot find module [Node npm Error Solved] - freeCodeCamp
To fix the error, you need to install the package that is absent in your project directory – npm install package-name or yarn...
Read more >How to resolve "Cannot find module" error in Node - Sabe.io
The issue is that Node is unable to find the module that you are trying to import into your Node application. The most...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Run this command npm install --save-dev electron For more detials https://www.christianengvall.se/electron-packager-tutorial/
maybe you install electron global, in your project: