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

Node commands not working? #22

Closed
kpgarrod opened this issue Jul 17, 2014 · 17 comments
Closed

Node commands not working? #22

kpgarrod opened this issue Jul 17, 2014 · 17 comments

Comments

@kpgarrod
Copy link

I have just installed the extension (Mac OSX 10.9) and can run normal shell commands (ls, pwd), but not node commands (bower install, npm install). I get 'command not found'. Clearly the path to 'bower' and 'npm' is not in $PATH, but I am not able to change the $PATH using export or by editing the bash profile. Any suggestions?

@johnhidey
Copy link
Owner

@kpgarrod First let me start off by saying I have very limited knowledge in the Mac realm as well as in the *nix platform. My first thought was that your .profile file within your home directory does not contain the path to both bower and npm.

When you say you are not able to change the path with export PATH= what do you mean by that? Do you mean that you are not able to change them within brackets ?

The env should inherit when I was launch the child_process in node. If this is not happening I'll be honest and say that as of right now I don't have any answer.

From what I have read, if you can change the PATH in your .profile file and then restart the node and brackets (just to play it safe) you path should be inherited.

Let me know and if not, I'll do some more digging.

@kpgarrod
Copy link
Author

Hi John,

Thanks for getting back to me. I don't have any issues with the path
outside of brackets, only inside the brackets shell. I'm afraid that's
about as much help as I can be right now. I'll be happy to test a fix if
you let me know how to do it.

Best,

Keith

On 17 July 2014 23:55, John Hidey notifications@github.com wrote:

@kpgarrod https://github.com/kpgarrod First let me start off by saying
I have very limited knowledge in the Mac realm as well as in the *nix
platform. My first thought was that your .profile file within your home
directory does not contain the path to both bower and npm.

When you say you are not able to change the path with export PATH= what do
you mean by that? Do you mean that you are not able to change them within
brackets ?

The env should inherit when I was launch the child_process in node. If
this is not happening I'll be honest and say that as of right now I don't
have any answer.

From what I have read, if you can change the PATH in your .profile file
and then restart the node and brackets (just to play it safe) you path
should be inherited.

Let me know and if not, I'll do some more digging.


Reply to this email directly or view it on GitHub
#22 (comment)
.

Keith Garrod

Tel: +27-83-3000-988
Fax: +27-86-5757781

@johnhidey
Copy link
Owner

@kpgarrod The shell should now be picking up your bash profile. I do not have a mac to test this but if you would verify this is fix is v0.0.7 I would appreciate it and then I can mark this closed.

@johnhidey johnhidey removed the bug label Dec 14, 2014
@kpgarrod
Copy link
Author

@johnhidey thanks for the effort but I still don't see the $PATH from my
.bashprofile in the Brackets shell

On 13 December 2014 at 18:54, John Hidey notifications@github.com wrote:

@kpgarrod https://github.com/kpgarrod The shell should now be picking
up your bash profile. I do not have a mac to test this but if you would
verify this is fix is v0.0.7 I would appreciate it and then I can mark this
closed.


Reply to this email directly or view it on GitHub
#22 (comment)
.

Keith Garrod

Tel: +27-83-3000-988
Fax: +27-86-5757781

@objectkit
Copy link

HI @johnhidey - I'm afraid I'm encountering the same issue as @kpgarrod Basic Terminal commands work, but I have no access to any installed terminal applications. An example would be using the 'which' command - application locations are never found in the extension, but are always found in Terminal :(

@johnhidey
Copy link
Owner

I finally have this working. I have verified this on an installation of Ubuntu 14 x86. All worked worked great. There may be an issue with Linux only returning LF for EOL. If so, please create a new issue for this. Should you have any issues, please let me know and I'll see if I can address them.

@kpgarrod
Copy link
Author

Hi John,

Sorry, but this still (0.0.9) doesn't work on my Mac - same result as
before.

Best,

Keith

On 16 December 2014 at 02:33, John Hidey notifications@github.com wrote:

Closed #22 #22.


Reply to this email directly or view it on GitHub
#22 (comment)
.

Keith Garrod

Tel: +27-83-3000-988
Fax: +27-86-5757781

@johnhidey
Copy link
Owner

@kpgarrod @objectkit After the update to allow you to swap out what shell is being used, do you still have this issue?

@kpgarrod
Copy link
Author

Sorry, I don't understand the question. What is the 'update to allow you to
swap out what shell is being used'? IS that a Brackets update or
brackets-shell update? I have upgraded Brackets to 1.1 and brackets-shell
to 0.11 and am still facing the issue. Is there something else I need to do?

On 23 December 2014 at 00:45, John Hidey notifications@github.com wrote:

@kpgarrod https://github.com/kpgarrod @objectkit
https://github.com/objectkit After the update to allow you to swap out
what shell is being used, do you still have this issue?


Reply to this email directly or view it on GitHub
#22 (comment)
.

Keith Garrod

Tel: +27-83-3000-988
Fax: +27-86-5757781

@johnhidey
Copy link
Owner

hdy.brackets-shell.shell: path to shell set to the path of your shell (i.e "/bin/sh" or "/bin/bash"). For Windows this should be set to "cmd.exe"

@kpgarrod
Copy link
Author

nope, sorry. I tried both '/bin/sh' and '/bin/bash', both of which are
valid paths, but no change.

On 23 December 2014 at 13:07, John Hidey notifications@github.com wrote:

hdy.brackets-shell.shell: path to shell set to the path of your shell
(i.e "/bin/sh" or "/bin/bash"). For Windows this should be set to "cmd.exe"


Reply to this email directly or view it on GitHub
#22 (comment)
.

Keith Garrod

Tel: +27-83-3000-988
Fax: +27-86-5757781

@johnhidey
Copy link
Owner

I'm not much of a Linux guy.. What is the command you are issuing? How can I test this? Is there a file that I need create to test this? Any and all help resolving this is appreciated.

Sent from my Windows Phone


From: kpgarrodmailto:notifications@github.com
Sent: ‎12/‎23/‎2014 6:56 AM
To: johnhidey/hdy.brackets-shellmailto:hdy.brackets-shell@noreply.github.com
Cc: John Hideymailto:john@hidey.com
Subject: Re: [hdy.brackets-shell] Node commands not working? (#22)

nope, sorry. I tried both '/bin/sh' and '/bin/bash', both of which are
valid paths, but no change.

On 23 December 2014 at 13:07, John Hidey notifications@github.com wrote:

hdy.brackets-shell.shell: path to shell set to the path of your shell
(i.e "/bin/sh" or "/bin/bash"). For Windows this should be set to "cmd.exe"


Reply to this email directly or view it on GitHub
#22 (comment)
.

Keith Garrod

Tel: +27-83-3000-988
Fax: +27-86-5757781


Reply to this email directly or view it on GitHub:
#22 (comment)

@johnhidey
Copy link
Owner

@kpgarrod I think I might be understanding this better now after a bit a research this morning. When I issue a command against the shell I am using child_process which the shell senses that I am not a terminal issuing this commands and set TTY to false as well as INTERACTIVE to false. I'm doing to so some more research and hopefully have a solution for this in the next couple of day. If you have particular test cases that I should be testing please share them with me if you wouldn't mind.

@kpgarrod
Copy link
Author

Hi John, I'm really just running any shell command, e.g. 'which node',
which should give me the path from which 'node' will be run

On 23 December 2014 at 15:00, John Hidey notifications@github.com wrote:

@kpgarrod https://github.com/kpgarrod I think I might be understanding
this better now after a bit a research this morning. When I issue a command
against the shell I am using child_process which the shell senses that I am
not a terminal issuing this commands and set TTY to false as well as
INTERACTIVE to false. I'm doing to so some more research and hopefully have
a solution for this in the next couple of day. If you have particular test
cases that I should be testing please share them with me if you wouldn't
mind.


Reply to this email directly or view it on GitHub
#22 (comment)
.

Keith Garrod

Tel: +27-83-3000-988
Fax: +27-86-5757781

@johnhidey
Copy link
Owner

here is a screen capture from a Ubuntu 14.04 Linux installation which is working. This is what you are expecting to see correct ?

capture

@johnhidey
Copy link
Owner

Ok, I have a Mac VM up and running now and I'm seeing the same thing that you are. If I run which gitthat seems to work. But which nodedoes not return me the path.

@carlosrubio
Copy link

I just installed the addon and found this issue. It is still broken? Can I help in any way?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants