`require 'remote'` is now undefined


#1

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:
require('electron').remote
but I don’t know how that means in Atom.

Thanks,
Alain


#2

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).


#3

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


#4

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.


#5

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