Closed uiur closed 4 years ago
chloride launches electron if electron is installed globally. (The module name of electron-prebuilt is renamed to electron. https://github.com/electron-userland/electron-prebuilt#installation )
electron-prebuilt
electron
npm i -g electron
This is because isElectron() requires electron to detect it.
function isElectron () { try { require('electron') return true } catch (_) { return false } }
https://github.com/dominictarr/chloride/blob/ca6978b4a0eaa07e490f0df0993e22dd4391fed8/index.js#L7
A possible solution is to see process.versions.electron etc. instead. https://github.com/cheton/is-electron/blob/master/index.js
process.versions.electron
great! thanks I've used this fix in chloride@2.2.3
chloride launches electron if electron is installed globally. (The module name of
electron-prebuilt
is renamed toelectron
. https://github.com/electron-userland/electron-prebuilt#installation )This is because isElectron() requires
electron
to detect it.https://github.com/dominictarr/chloride/blob/ca6978b4a0eaa07e490f0df0993e22dd4391fed8/index.js#L7
A possible solution is to see
process.versions.electron
etc. instead. https://github.com/cheton/is-electron/blob/master/index.js