Use iojs that is packaged up in Electron to run scripts depending on node/iojs?


#1

As the subject says, is this even possible? If I ship an app out that uses built in node_modules and some scripts that references node, if the user doesn’t have node/iojs on their machine then it fails. Is there anyway to target the builtin version that ships with Electron?

Thanks!


#2

You can use the ATOM_SHELL_INTERNAL_RUN_AS_NODE environment variable to start electron as node; e.g. env ATOM_SHELL_INTERNAL_RUN_AS_NODE=1 ~/Applications/Electron.app/Contents/MacOS/Electron