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


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?



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/