I installed the node.js as root user yesterday things are fine out there if I login as root user (Ubuntu 13.04 64 bit). As you know we don’t wanna mess up with root user so created a sudo user and tried node command and found that it doesn’t work for the new user.
Is it normal or am I doing something wrong??
PS : Now I’m reinstalling nodejs for the sudo userr
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Hi - a recent article has some good info on how to run Node. Give it it a read - you may find it useful: https://www.digitalocean.com/community/articles/how-to-use-pm2-to-setup-a-node-js-production-environment-on-an-ubuntu-vps
NodeJS is installed locally by default. You can run the installer as root and have it installed globally so all users can run it.
I think when you install node it places the node modules folder in the current users main directory. This means that if you created another user that cannot see inside the root folder node stops working correctly. <br> <br>Most people advise against installing elements that don’t require root- as root. Therefore, you’ll probably be better off creating a normal simple user with a main directory as something like /home/. Then from there install NodeJs as that new simple user.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.