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.

Monaco Editor Not Initializing In Electron With Angular 11 (Reproduction Link in Description)

See original GitHub issue

Reproduced Here: https://github.com/stagefright5/strong-soap-dynamic-module-load-issue/tree/issue-monaco-load

This repo tries to create the official demo inside the electron.

In the above repo inside monaco.component.html, there is an event listener for the init event that is supposed to be emitted by the ngx-monaco-editor. That listener is never run because init is never emitted.

Please take a look at this and confirm if this is an issue.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:13

github_iconTop GitHub Comments

2reactions
GeoAstronautecommented, Mar 1, 2021

The same as yours as I was using your repository example. I was able to reproduce the issue BTW, by retrying from scratch. Not sure why it worked well the first time I tried (I have the same issue now with yarn/npm).

The issue occurred in serve mode, with the particular repository you have (angular electron), you will notice that it works well when using the script: electron:local. The issue here is the path used when we are inside electron and angular is in serve mode.

I will do a new version with a better error handling, to see the loading errors in the console with the path used. In addition, we will be able to use CDN in electron (issue on path for electron that will be fix). When it’s done you will be able to use the CDN when working in “serve” mode, and use your local monaco-editor when you build your application (didn’t find an easy way to have the correct path to monaco when running in serve mode inside electron).

1reaction
Exclamation-markcommented, Jul 5, 2021

Issue fixed in v5.1.0.

So my advice here is to use the CDN when working in electron with serve mode.

There is also to notice that it does not work when BrowserWindow.webPreferences.contextIsolation is set to false.

Thank you for your reply. It took me a long time to find a way to use ngx-monaco-editor in electron. I suggest putting this situation in readme.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Monaco editor in Electron with AngularJS - Stack Overflow
All is working fine if the loader.js of monaco isn't included as a script file. The error appears in one of my AngularJS...
Read more >
Unable To Get A Custom Json Schema Working With Editor
Monaco Editor Not Initializing In Electron With Angular 11 Reproduction Link in Description This repo tries to create the official demo inside the...
Read more >
KqW - River Thames Conditions
#box As tres mosqueteiras imagens, Gta 5 property management overview, ... Uncle jonathan's 20 kites, Facebook like box wordpress not working!
Read more >
monaco-editor-electron - npm
Monaco editor wrapper in Electron for easy/one-line integration with React applications (e.g. powered by create-react-app) without need of ...
Read more >
typeerror: cannot read properties of undefined (reading 'config')
Open links in a new tab ... Mount the component as the last initialization step: ... Describe the bug monaco-react with new electron...
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