isaacs/npm — Issue #1824: Error installing NPM using one-line-install
Author: osher
Created: 2011-12-01 16:02:17+00:00
State: open

Hi,

Error from installing npm using the one line.
Running the proposed 1 line with sudo did not help.

The error:
```
tar=/bin/tar
version:
tar (GNU tar) 1.25
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later .
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by John Gilmore and Jay Fenlason.
fetching: http://registry.npmjs.org/npm/-/npm-1.0.106.tgz
0.5.11-pre
1.0.106
cleanup prefix=/usr/local

All clean!
npm ERR! Could not create /usr/local/lib/node_modules/___npm.npm
npm ERR! error installing npm@1.0.106 Error: EACCESS, Permission denied '/usr/local/lib/node_modules'
npm ERR! Error: EACCESS, Permission denied '/usr/local/lib/node_modules'
npm ERR! Report this *entire* log at:
npm ERR!
npm ERR! or email it to:
npm ERR!
npm ERR!
npm ERR! System Linux 3.0.0-12-generic
npm ERR! command "/usr/local/bin/node" "/tmp/npm.21755/package/cli.js" "install" "-gf"
npm ERR! cwd /tmp/npm.21755/package
npm ERR! node -v v0.5.11-pre
npm ERR! npm -v 1.0.106
npm ERR! path /usr/local/lib/node_modules
npm ERR! code EACCESS
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /tmp/npm.21755/package/npm-debug.log
npm not ok
It failed
```
P.S:
It helped when I downloaded the install script and run it as sudo.

so, maybe there's a way to put the sudo for the piped action after the curl...