Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't run Electron #33

Closed
konrad-lapinski opened this issue Feb 28, 2017 · 10 comments
Closed

Can't run Electron #33

konrad-lapinski opened this issue Feb 28, 2017 · 10 comments
Labels
bug report 🐛 Something isn't working duplicate 🐑🐑 This issue or pull request already exists
Milestone

Comments

@konrad-lapinski
Copy link

Tried to use npm install and npm start commands. npm install works fine but when I type npm start it runs all scripts and then either doesn't even start or automaticly ends after scripts ends.

@Fred-Barclay
Copy link
Collaborator

Hi @Drwalnik
Thanks for trying Termination!

It's the same bug as #11. Neither atom, electron, node, nor npm work due to the way Atom interacts with Termination (specifically, it sets electron to run as node).

For long-term, we'll definitely do our best to change this behavior. 😄

@Fred-Barclay Fred-Barclay added the duplicate 🐑🐑 This issue or pull request already exists label Feb 28, 2017
@Naki21
Copy link

Naki21 commented Feb 28, 2017

I have been having the problem using platformio-ide-terminal and I think I may have figured it out. (atom/atom#11475) Here they mention that

the environment variable ATOM_SHELL_INTERNAL_RUN_AS_NODE was renamed to ELECTRON_RUN_AS_NODE some time ago. I don't know about running Electron apps from inside Atom using terminal-plus. This isn't intended as a fix for that since it isn't a bug that I am aware of. If there is an open Issue somewhere for it, please post a link so that I can read up on it 😀

I looked at the process.coffee file in the platformio package and saw that it was still named 'ATOM_SHELL_INTERNAL_RUN_AS_NODE' in 'filteredEnvironment'. I changed to ELECTRON_RUN_AS_NODE and it seems to be working fine. It looks like Termination is missing it all together so adding 'ELECTRON_RUN_AS_NODE' I would hope fixes the issue? Let me know!

filteredEnvironment = do -> env = _.omit process.env, 'ATOM_HOME', 'ELECTRON_RUN_AS_NODE', 'GOOGLE_API_KEY', 'NODE_ENV', 'NODE_PATH', 'userAgent', 'taskPath' env.LANG ?= systemLanguage env.TERM_PROGRAM = 'platformio-ide-terminal' return env

@Fred-Barclay
Copy link
Collaborator

Fred-Barclay commented Feb 28, 2017

@Naki21: If this works, I'll owe you a cup of coffee! ☕ I'd read up on ATOM_SHELL_INTERNAL_RUN_AS_NODE being renamed to ELECTRON_RUN_AS_NODE and deleted the entire variable in a59096f in hopes it would solve our issues... for some reason it never crossed my mind to simply rename it correctly!

The atom command, at any rate, now works perfectly. I'll set up a VM and install electron and node, and if they work too let's get these issues closed! 🎉

filteredEnvironment = do ->
  env = _.omit process.env, 'ATOM_HOME', 'ELECTRON_RUN_AS_NODE', 'GOOGLE_API_KEY', 'NODE_ENV', 'NODE_PATH', 'userAgent', 'taskPath'
  env.LANG ?= systemLanguage
  env.TERM_PROGRAM = 'termination'
  return env

@Fred-Barclay
Copy link
Collaborator

Fred-Barclay commented Mar 1, 2017

@Naki21 Scratch that, let's go ahead and fix this and push a new release. It needs renaming anyways, and it'll be easier for @Drwalnik @jwogrady and @chrisallenmoore and everyone else to test and (hopefully) confirm that it fixes everything. 👍

@Fred-Barclay
Copy link
Collaborator

Release 0.5.0 has been pushed! Please try it and let me know if it fixes the issue.

@konrad-lapinski
Copy link
Author

sorry, it still doesn't work for me.

@Fred-Barclay
Copy link
Collaborator

Fred-Barclay commented Mar 1, 2017

@Drwalnik Hmm, okay. Can I get the info from you in CONTRIBUTING.md#filing-an-issue?

@pbarbiero
Copy link

pbarbiero commented Mar 3, 2017

I did a lot of tracking on this, see my comments (or my very last one) in platformio/platformio-atom-ide-terminal#112 for a fix. The main issue is we lose the prebuilt native modules which might be a deal breaker for wide release...

If someone could figure out how to get some prebuilds going for node-pty (or if we can convince Tyriar to ship them) we would be golden.

@Fred-Barclay
Copy link
Collaborator

Hi @PhillMcKraken
Thanks for sticking with this! I don't have a personal Windows machine so testing and digging around isn't the simplest task for me. 😁 But I'm working on it and I've got a few ideas I'm kicking around.

@Fred-Barclay
Copy link
Collaborator

As we now use node-pty-prebuilt (thanks @daviwil!) this can be closed at long last. 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug report 🐛 Something isn't working duplicate 🐑🐑 This issue or pull request already exists
Development

No branches or pull requests

4 participants