You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to run ngx-monaco-editor in electron but I get the following error:
in.ts:13 ERROR Error: Uncaught (in promise): TypeError: window.require.config is not a function
TypeError: window.require.config is not a function
at onGotAmdLoader (ngx-monaco-editor-v2.mjs:44:36)
at ngx-monaco-editor-v2.mjs:62:21
Did anyone manage do this?
Setting nodeIntegration to true gets rid of the error:
Make sure to load the preload script in app\main.ts and that contextIsolation is set to false, otherwise the values of the preload script are not accessible on the window object:
So if you had to set nodEIntegration to true by yourself, that means you made changes on your project that may cause the encounter issue.
Please read #752 (comment) if you want to add preload script with nodeIntegration: false
Hello,
I am trying to run ngx-monaco-editor in electron but I get the following error:
Did anyone manage do this?
Setting nodeIntegration to true gets rid of the error:
Unfortunately this results in ipcRenderer being undefined and electronService.isElectron being false when opening the app in electron:
Update:
I fixed this issue by adding a preload.js script:
The electron.service.ts has to be adjusted like this:
Make sure to load the preload script in app\main.ts and that contextIsolation is set to false, otherwise the values of the preload script are not accessible on the window object:
The text was updated successfully, but these errors were encountered: