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

Working with "sudo"? #5

Closed
TooTallNate opened this issue Jul 26, 2010 · 3 comments
Closed

Working with "sudo"? #5

TooTallNate opened this issue Jul 26, 2010 · 3 comments
Labels
root / multiuser issues Anything related to using `sudo` or `su`, or using nvm across multiple user accounts.

Comments

@TooTallNate
Copy link

How can I get my node installs to work with the "sudo" command?

nrajlich@stan:~$ node
Type '.help' for options.
node> .exit
nrajlich@stan:~$ sudo node
sudo: node: command not found

Thanks in advance!

@creationix
Copy link
Collaborator

It's not so easy actually since nvm works with your local environment, and sudo is a different environment.

One solution is to manually symlink everything in the your current active bin folder from /usr/local. Another solution is to add your nvm bin dir to root's $PATH.

@TooTallNate
Copy link
Author

I went with the symlink. Lame but works for now, until I start using spark and don't have to use sudo anymore.

@creationix
Copy link
Collaborator

I'm working on a better solution. Did you see my article about my deployment setup?

http://howtonode.org/deploying-node-with-spark

The secret there is to set the $PATH in the upstart script so that it can find spark.

@ljharb ljharb added the root / multiuser issues Anything related to using `sudo` or `su`, or using nvm across multiple user accounts. label Nov 2, 2014
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
root / multiuser issues Anything related to using `sudo` or `su`, or using nvm across multiple user accounts.
Projects
None yet
Development

No branches or pull requests

3 participants