Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Tue Jun 16, 2015 8:31 pm 
Offline
Newbie

Joined: Tue Jun 16, 2015 8:28 pm
Posts: 2
Hey, everyone,

I followed the linode documentation on NGINX + NODE (such an easy walkthrough, by the way!) and successfully set everything up.

However one thing I noticed is that whenever I change my sites-available file and reload the server (sudo service nginx reload) the bash can't find 'node' anymore. Re-running (nvm install 0.10) fixes this, but that's going to get annoying really quickly.

Any suggestions?


Top
   
PostPosted: Wed Jun 17, 2015 2:43 am 
Offline
Newbie

Joined: Tue Jun 16, 2015 8:28 pm
Posts: 2
So I think I have more information here.

It could be related to missing environment PATH locations.

I think that NPM was not installed in the root, so I can't run the command without sudo, but sudo won't find the correct path because it's looking in the root.

The workaround was to use:

sudo env "PATH=$PATH" npm install

But this is still just a hack.

This same issue resurfaced elsewhere.. when I was trying to install a node-gyp module, the npm install failed because I was using sudo. I read that I had to add the extra flag:

sudo env "PATH=$PATH" npm install --unsafe-perm

But it's still not working for me, and I'm dead in the water without being able to run my app.

Any thoughts?


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group