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.

Is it possible to run it inside electron?

I’ve tried and I’m getting the following error:

Uncaught Error: Cannot find module 'wolfy87-eventemitter'

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
renataogarciacommented, Dec 9, 2015

I believe it is CommonsJS. However, I’m using imagesloaded in a script running inside a BrowserWindow, so it’s not electron/node code.

I can get it working by commenting the following lines:

} else if ( typeof module == 'object' && module.exports ) {
    // CommonJS
    module.exports = factory(
      window,
      require('wolfy87-eventemitter'),
      require('eventie')
    );

and

else if (typeof module === 'object' && module.exports){
    module.exports = EventEmitter;
}
0reactions
kinsleykajivacommented, Dec 29, 2017

Hi, this is what i did to make my error go away in electron

`<script>if (typeof module === 'object') {window.module = module; module = undefined;}</script>
 <script type="text/javascript" src="../public/js/frameworks/jquery.js"></script>
  ` <script type="text/javascript" src="../public/js/frameworks/jquery.min.js"></script>
     <script type="text/javascript" src="jquery-ui.min.js"></script>
   <script type="text/javascript" src="../public/js/frameworks/bootstrap.min.js"></script>

    <!-- plugins -->
    <script src="../public/js/frameworks/imagesloaded.pkgd.min.js"></script>
    <script src="../public/js/frameworks/masonry.pkgd.min.js"></script>
     <script src="../public/js/frameworks/holder.min.js"></script>
    <script src="../public/js/frameworks/moment.min.js"></script>
   <script src="../public/js/frameworks/jquery.nicescroll.js"></script>
 

    <!-- custom -->
    <script src="../public/js/frameworks/main.js"></script>
    
    <!-- end: Javascript -->
    <script>if (window.module) module = window.module;</script>
Read more comments on GitHub >

github_iconTop Results From Across the Web

Electron Support
If you're looking for programming help, for answers to questions, or to join in discussion with other developers who use Electron, you can...
Read more >
Electron | endoflife.date
Check End of Life, Support Schedule, and release timelines for AlmaLinux OS, Alpine Linux, Amazon Linux, Android OS, Angular, Ansible-core, Ansible, antiX, ...
Read more >
electron/support.md at main - docs - GitHub
electron: Build cross-platform desktop apps with JavaScript, HTML, and CSS - electron/support.md at main · electron/electron.
Read more >
What is minimum system requirements to run electron apps?
based on Electron supported platforms and Chrome minimum requirements. OS requirements. Windows. Windows 7 and later are supported, ...
Read more >
Electron (software framework) - Wikipedia
Electron is a free and open-source software framework developed and maintained by GitHub. ... The latest three stable version are support by the...
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