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.

Can't use electron-log in the preload script while global sandbox is turned on

See original GitHub issue

when trying to import electron-log with global sandbox enabled I get this error in the preload script which is causing it to fail to load.

Error: module not found: os

removing electrton-log import seems to take care of it, is there a way to prevent electron-log from loading ‘os’ in for the preload script?

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

4reactions
megahertzcommented, Aug 31, 2022

@eliw00d I’m already thinking on that.

1reaction
eliw00dcommented, Aug 31, 2022

Given that the recommended practice from Electron is to sandbox, and that contextIsolation is on by default, I would hope this is a feature that could be added!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Electron App : Unable to load preload script - Stack Overflow
As the error suggests, contextIsolation needs to be enabled to allow you to use the contextBridge API const createWindow = () => {...
Read more >
Using Preload Scripts - Electron
Add a new preload.js script that exposes selected properties of Electron's process.versions object to the renderer process in a versions global variable.
Read more >
Unable to require path and fs modules in preload script - Reddit
I have been trying to resolve this issue for the last 3 hours and am unable to make any progress. The preload script...
Read more >
electron-log - npm
Just a very simple logging module for your Electron application. Latest version: 4.4.8, last published: 6 months ago. Start using ...
Read more >
Lifesize Setup 2.216.2806.exe - Hybrid Analysis
Reads the active computer name. Reads the cryptographic machine GUID; Evasive: Marks file for deletion. Possibly tries to evade analysis by sleeping many ......
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