I'm using the latest version of stable node.js (0.8.19)
$cd ~/downloads/node
$./configure
$make
$sudo make install
Doing this installed node.js
Now, when I go to:
$cd ~/myproject/node_modules
$npm install express
npm ERR! Error: EACCES, open '/home/user/.npm/64a534c1-express.lock'
npm ERR! { [Error: EACCES, open '/home/user/.npm/64a534c1-express.lock']
npm ERR! errno: 3,
npm ERR! code: 'EACCES',
npm ERR! path: '/home/user/.npm/64a534c1-express.lock' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
npm ERR! System Linux 3.5.0-17-generic
npm ERR! command "/usr/local/bin/node" "/usr/local/bin/npm" "install" "express"
npm ERR! cwd /home/user/myproject/src
npm ERR! node -v v0.8.15
npm ERR! npm -v 1.1.66
npm ERR! path /home/user/.npm/64a534c1-express.lock
npm ERR! code EACCES
npm ERR! errno 3
npm ERR! stack Error: EACCES, open '/home/user/.npm/64a534c1-express.lock'
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/user/myproject/src/npm-debug.log
npm ERR! not ok code 0
See? for some reason I cannot install npm as a local user. However, when I use sudo npm install express
, everything works.