> On Jan 5, 2015, at 5:22 PM, Sam Roberts <[email protected]> wrote:
> 
> On Mon, Jan 5, 2015 at 12:54 PM, Aria Stewart <[email protected]> wrote:
>>> If you are setting up a production machine, probably best to install
>>> node as root, and if absolutely necessary to do any npm global
>>> installs (should be rare), run the global installs as root, or with
>>> sudo, and use --unsafe-perm so that scripts run with sufficient privs
>>> to succeed, and so that the ~/.npm/ cache is writeable.
>> 
>> As a heads up: --unsafe-perm is the default when run as root. You don't need 
>> to specify it.
> 
> Good to know. I guess I can understand the rationale... and now I
> know why I occaisonally get reports that running as root and running
> using sudo fail differently. :-(
> 

Nope! sudo's as root too. Should all be the same. If you're not using npm@2, 
though, that's where I'd put my blame.

>>> - avoiding your .npm cache from containing a mix of root and user-owned 
>>> packages
>> 
>> This was a bug in earlier npm; upgrade to the latest and this won't happen.
> 
> By latest, you mean fixed in npm2?
> 
> npm2 is pretty much mandatory on Windows, the pain of not using it is
> greater than any risk, but I've been a bit reluctant to recommend
> Linux user's upgrade to it in production. Maybe unreasonably
> reluctant. But once 0.12 is out the world will start using it, and any
> issues will get shaken out pretty fast.

There are a bunch of race conditions in [email protected]. They're subtle, tricky, and 
some of them are silent. Random failures? Files just not written? missing bits 
and bobs? Blame race conditions. I'd quite frankly put some fear in of using 
npm@1. npm@2 is a way safer bet.

Aria

-- 
Job board: http://jobs.nodejs.org/
New group rules: 
https://gist.github.com/othiym23/9886289#file-moderation-policy-md
Old group rules: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
--- 
You received this message because you are subscribed to the Google Groups 
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/nodejs/2AD59079-005A-4C54-98E4-8CB0FE288B15%40nbtsc.org.
For more options, visit https://groups.google.com/d/optout.

Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to