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.

Addon loader doesn't work in Electron

See original GitHub issue

Since the 2.0 release the loadAddon method doesn’t work anymore in Electron apps.

Code:

var Terminal = require('xterm');
Terminal.loadAddon('fit');

Error: Uncaught Error: Cannot find module '/src/../addons/fit'

The same code does work with version 1.1.3.

Details

  • Browser and browser version: Electron 1.4.3 (Chrome 53.0.2785.113)
  • OS version: MacOS Sierra
  • xterm.js version: 2.0.0 / 2.0.1

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
pariskcommented, Oct 9, 2016

@parisk see my first comment for the import code i used.

🙈 I totally lost this

The updated code in update-addons-paths works for me now!

👍 moving forward with merging.

0reactions
ovanschiecommented, Oct 9, 2016

@parisk see my first comment for the import code i used.

The updated code in update-addons-paths works for me now!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Can not load native addon module in production #601 - GitHub
It seems try to find the module with an absolute path which only exist in my development machine. After I search for answers...
Read more >
Using Node.js addons in Electron's renderer with Webpack
The first problem is that node-bindings , which node-serialport relies on to resolve the path to its Node.js addon, simply doesn't work in ......
Read more >
Native Node Modules | Electron
If you installed a native module and found it was not working, you need to check the following things: When in doubt, run...
Read more >
Using Node.js addons in Electron's renderer with Webpack ...
The first problem is that node-bindings , which node-serialport relies on to resolve the path to its Node.js addon, simply doesn't work in...
Read more >
Configuration | Vue CLI Plugin Electron Builder - GitHub Pages
Easily Build Your Vue.js App For Desktop With Electron. ... By default, the app protocol is used to load files. This allows you...
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