Unclear if dependencies must be installed as root?

npm install -g gulp bower

I know many people use Mac machines and are developing locally using some flavor of *AMP

In this case it assumed I guess, that whatever you install is done so with root privileges.

What about on a server that has users assigned to a wheel group?

In my case I am using a VMware machine running locally, but it is a full production server using Ubuntu 14.04.x LTS

Must the installation of the dependency tools be done as sudo, or should they be done as the file owner?

It is unclear from the docs, and is probably one of those “assumed” things that can easily be overlooked if you already know the answer.

In either case, does it matter, or do we actually have to install the tools as root, or as the file owner?

I’m asking because when I queried gulp -v , I received the following error:

Error: EACCES, permission denied ‘/srv/users’

I used NVM to install Node.js 0.12.8

I can easily destroy the machine and revert to a snapshot if I got it wrong.

Thanks

Guy

We never tell people to use root. In fact our official recommendations are to use nvm and never use sudo: Npm Debugging Guidelines (Failed npm install, bower install, or gulp build? Read this)

1 Like

Excellent, thanks for confirming that. I’m just starting out with Sage so this is good to know, and I will be spending a lot more time studying the docs.

In the meantime, are you able to shed any light on this?

Really amazing response time btw, much appreciated!

Scratch that, sorry!

I will read before replying again, thanks again!

I’m finally up and running after about the 6th attempt! :grin:

I don’t know why I was having such trouble, but what seemed to finally sort it out, is that I installed Node 5.1.1 via NVM (not a sudo in sight).

I had been trying to install v0.12.9 (and .8 before .9 was released), and it just kept failing with errors.

I don’t know if this is related to the version of NVM I have been installing (latest), but as of last night it was still not working.

Everything worked first time today using Node 5.1.1. …go figure.

Anyway, please consider this closed. I couldn’t have got it right without all the top quality detail in the forum and the documentation, as well as the replies I received to my questions here, as well as in a couple of other threads.

Thanks!

1 Like