-
Notifications
You must be signed in to change notification settings - Fork 161
Error occurred when running electron .
#112
Comments
+1 Works in CMD, but not here |
same error, please try |
+1 Same error on Windows 10 64x, Atom 1.12.7, Electron 1.3.13, PlatformIO IDE Terminal 2.2.2. |
+1 Similar behavior except that I get this error: App threw an error during load When I run electron from a system terminal everything works fine (I'm on Lubuntu 16.04). |
There appears to be a general error with opening any Electron applications from within Atom. I've opened an issue on the Atom repo. |
Same issue |
Same issue here |
Well it might be an issue with pty.js -- I cant get it to accept the updated "env" object that "C:\Windows\system32\cmd.exe " in process.coffee creates. Its excluding env parameters from the list, but those parameters still ultimately show up in the terminal instance. Even if i manually override "ELECTRON_RUN_AS_NODE = 0", it still shows up as 1 once I run "set" in my terminal. I think I am at my limit of tracing this. I still dont know if the issue is this plugin, atom.io, or pty.js now. |
Looks like its due to pty.js being outdated and not maintained. https://github.com/Tyriar/node-pty has many, many fixes for windows (and other platforms as well). Investigating the code base differences between that and pty.js, there definitely are some environment fixes in there. And that is the root issue we are having here. I am unable to test however, as when I build node-pty and switch platformio-atom-ide-terminal to use it instead, I get complaints about it not being a valid win32 application and I cant find a prebuilt version of it. Definitely at my limits here for this sort of thing it seems like. |
Well I tried again, basing off of #155 (comment) using node-pty instead, however I get the same invalid win32 app, for both 32 and 64bit versions of Atom. I seriously hope someone else can try and confirm if node-pty fixes these issues, as I would love to be able to run "electron ." from the embedded terminal without needing a separate instance. A workaround is to manually do |
@ivankravets any input here? I unfortunately am not equipped to take it any further at this point. |
@ivankravets That was one of the very first things I tried unfortunately. This will need to be reopened, along with many of those other issues I am sure -- atleast for windows. |
@ivankravets Confirmed still broken in 2.4.0 |
@PhillMcKraken Thanks, will wait for a PR to fix this issue. |
@ivankravets I finally managed to figure out why my build was failing, I wasnt running apm rebuild properly to build the native modules properly for the current atom/electron revision. I did confirm that this issue was resolved entirely by switching to node-pty (not to mention it is much, MUCH faster as well, along with a boatload of fixes for windows in general) I can make a pull, but all I did was change pty.js to node-pty and included it instead of pty.js from process.coffee (see https://github.com/PhillMcKraken/platformio-atom-ide-terminal/commit/5653f119d225f09cd6053d5b9ea1b267542a228c) -- the issue here is that requires everyone to have python2.8 installed on their machine (everything else seems to be already included with the apm processes) I noticed you did some prebuild work with pty.js, that would have to be done for this as well. I was unable to make an appveyor build work, even following your process in #155 (comment) Any suggestions? |
Hi, I have done exactly what did you describ above: i changed the two lines in pty.js and package.json, installed python2.8, but don't know how and what i have to rebuild Can you explain how to fix this problem by steps? Thank you |
Try again with platformio-ide-terminal 2.9.0 |
Environment:
OSX 10.11.6
Atom 1.12.6
Platformio Ide Terminal 2.2.2
Electron 1.4.10
In system terminal, it's OK when running "electron .". But in "Platformio Ide Terminal", error was returned:
module.js:457
throw err;
^
Error: Cannot find module 'electron'
at Function.Module._resolveFilename (module.js:455:15)
at Function.Module._load (module.js:403:25)
at Module.require (module.js:483:17)
at require (internal/module.js:20:19)
at Object. (/Users/un/Documents/electron-quick-start/main.js:1:97)
at Module._compile (module.js:556:32)
at Object.Module._extensions..js (module.js:565:10)
at Module.load (module.js:473:32)
at tryModuleLoad (module.js:432:12)
at Function.Module._load (module.js:424:3)
The text was updated successfully, but these errors were encountered: