`require 'remote'` is now undefined


This was ok a few releases ago. What happened and how can I fix it?

I read there’s been some changes in electron to avoid module names conflicts and in electron you should use:
but I don’t know how that means in Atom.



You should use require('electron').remote. Atom is an Electron application, after all :wink:

The update to Electron post-v1.0 (which is where this change took place) happened in v1.12 (beta announcement, stable announcement).


require 'remote' works fine. I had a typo. Gotta get used to these dynamic languages …
Thanks for the reply.


Even if it works fine, I would still suggest that you use require('electron').remote. You’ll see deprecation warnings whenever the old style is used.


I don’t see deprecation warnings with the latest release. I’ll take note for my next update.