Require("electron").remote deprecated

I updated atom to the last release, however I got (further than some package issues) this deprecation message. I am not able to solve it as if I try to open the remote.js file I got the error message, it does not exist. How can I fix this?

Use require("electron").remote instead of require("remote") 
Object.<anonymous> - /Applications/Atom.app/Contents/Resources/app.asar/exports/remote.js:4:6 
Object.<anonymous> - /Applications/Atom.app/Contents/Resources/app.asar/exports/remote.js:11:3 
Module._compile - <embedded>:11:149837 
Object..js - <embedded>:11:153385 
Module.load - internal/modules/cjs/loader.js:815:32 
Module._load - internal/modules/cjs/loader.js:727:14

Why is this a problem for you, this message is meant for developers of Atom/Electron. Does it interfere with your work (e.g. through a notification) or is it just a message in the console or in the Deprecation Cop status bar?

1 Like

It is in the deprecation cop status bar. I know it is only a warning, however it annoys me and it gives me a notification every time I start Atom

For me, it is a problem. Julia REPL crashes, and I cannot restart.

1 Like

I get the same Julia REPL crashing problem associated with that deprecation warning message.

For me, I fixed the crashing REPL by reinstalling the packages: uber-juno, julia-client, ink, and language-julia. The deprecation warnings are still there, since as mentioned, they are just warnings.

1 Like

In the same vain, I have a similar problem with “shell”:

Use `require("electron").shell` instead of `require("shell")`
Object.<anonymous> - /Applications/Atom.app/Contents/Resources/app.asar/exports/shell.js:4:6
Object.<anonymous> - /Applications/Atom.app/Contents/Resources/app.asar/exports/shell.js:9:3
Module._compile - <embedded>:11:149837
Object..js - <embedded>:11:153385
Module.load - internal/modules/cjs/loader.js:815:32
Module._load - internal/modules/cjs/loader.js:727:14

I’m on Mac OS X with the latest 1.56.0

1 Like

@oscar-defelice you can try opening a window in Developer Mode to get more-useful error messages for things bundled in the core of Atom…

Atom’s Developer Mode requires git cloneing the Atom repository: git clone https://github.com/atom/atom.

Then cd atom, then switching to a branch matching the version of Atom you are using: git switch 1.xx-releases (where xx is replaced with a real Atom version, maybe git switch 1.56-releases. Or for older versions of git: git checkout -b 1.56-releases origin/1.56-releases).

Then run script/bootstrap in the atom repository (which takes a while, maybe 20 minutes to an hour or more, depending on the speed of your computer).

Then you can launch Atom in Developer Mode from the command-line: atom -r path/where/you/cloned/atom.

This way you don’t get <embedded> in the stack trace, meaning some part of Atom’s bundled code. Instead, you get real individual files loaded from the disk (from the cloned atom repository).

Perhaps someone who has been working deep in Atom will get a chance to take a look at the source of the deprecation notices soon. In the mean-time, those are the steps to find out what is causing these warnings.

Best regards.

1 Like

Thank you very much!

I was precisely looking for this kind of solution, at least to see where these deprecation notices come from!

Thanks a lot,
Best,
Oscar