How to expose node binary to electron app without install node -


i build electron app plugin system based on yarn (installed node module), since don't want force users install node or npm.

some plugins depends on modules postinstall script "node index.js". script failed because node doesn't exists.

since electron contains version of node thought add directory electron's node path, can't find node binary in packaged app.

i missed something? can think other workaround?

i use electron-packager on mac.

i don't think it's relevant issue here main part of install function:

var modulepath = join(__dirname, '../', 'node_modules', 'yarn', 'bin', 'yarnpkg')  var args = ['add', `${plugin.name}@${plugin.version}`, '--json' ]  var child = fork(modulepath, args ,{ silent: true, cwd: this.pluginspath })

process info:

{    "path": "/usr/bin:/bin:/usr/sbin:/sbin",    "versions": {      "http_parser": "2.7.0",      "node": "6.5.0",      "v8": "5.3.332.45",      "uv": "1.9.1",      "zlib": "1.2.8",      "ares": "1.10.1-dev",      "modules": "50",      "openssl": "1.0.2h",      "electron": "1.4.5",      "chrome": "53.0.2785.113",      "atom-shell": "1.4.5"    }  }


Comments

Popular posts from this blog

php - How to add and update images or image url in Volusion using Volusion API -

Laravel mail error `Swift_TransportException in StreamBuffer.php line 269: Connection could not be established with host smtp.gmail.com [ #0]` -

c# SetCompatibleTextRenderingDefault must be called before the first -