I currently have node.js version 0.8.8 and npm 1.1.59 installed.
Whenever I run:
$ npm install -g express
I get this in return:
npm ERR! Error: EACCES, open '/Users/devinandrews/.npm/64a534c1-express.lock' npm ERR! { [Error: EACCES, open '/Users/devinandrews/.npm/64a534c1-express.lock'] npm ERR! errno: 3, npm ERR! code: 'EACCES', npm ERR! path: '/Users/devinandrews/.npm/64a534c1-express.lock' } npm ERR! npm ERR! Please try running this command again as root/Administrator. npm ERR! System Darwin 12.1.0 npm ERR! command "node" "/usr/local/bin/npm" "install" "-g" "express" npm ERR! cwd /Users/devinandrews npm ERR! node -v v0.8.8 npm ERR! npm -v 1.1.59 npm ERR! path /Users/devinandrews/.npm/64a534c1-express.lock npm ERR! code EACCES npm ERR! errno 3 npm ERR! stack Error: EACCES, open '/Users/devinandrews/.npm/64a534c1-express.lock' npm ERR! npm ERR! Additional logging details can be found in: npm ERR! /Users/devinandrews/npm-debug.log npm ERR! not ok code 0
I am pulling my hair out right now, trying to figure it out.
Update:
I ran
$ npm -g ls
to see that npm has been installed globally:
/usr/local/lib βββ¬ express@3.0.0rc4 β βββ commander@0.6.1 β βββ¬ connect@2.4.4 β β βββ bytes@0.1.0 β β βββ formidable@1.0.11 β β βββ pause@0.0.1 β β βββ qs@0.4.2 β βββ cookie@0.0.4 β βββ crc@0.2.0 β βββ debug@0.7.0 β βββ fresh@0.1.0 β βββ methods@0.0.1 β βββ mkdirp@0.3.3 β βββ range-parser@0.0.4 β βββ¬ send@0.0.4 β βββ mime@1.2.6 βββ¬ npm@1.1.59 βββ abbrev@1.0.3 βββ ansi@0.1.2 βββ archy@0.0.2 βββ block-stream@0.0.6 βββ chownr@0.0.1 βββ couch-login@0.1.10 βββ fstream@0.1.18 βββ¬ fstream-npm@0.1.1 β βββ fstream-ignore@0.0.5 βββ glob@3.1.12 βββ graceful-fs@1.1.10 βββ inherits@1.0.0 βββ ini@1.0.4 βββ¬ init-package-json@0.0.5 β βββ promzard@0.2.0 βββ lockfile@0.2.1 βββ lru-cache@2.0.1 βββ minimatch@0.2.6 βββ mkdirp@0.3.4 βββ node-gyp@0.6.7 βββ nopt@2.0.0 βββ npm-registry-client@0.2.6 βββ¬ npmconf@0.0.11 β βββ¬ config-chain@1.1.1 β βββ proto-list@1.2.2 βββ npmlog@0.0.2 βββ once@1.1.1 βββ osenv@0.0.3 βββ¬ read@1.0.4 β βββ mute-stream@0.0.3 βββ read-installed@0.0.2 βββ read-package-json@0.1.4 βββ request@2.9.203 βββ retry@0.6.0 βββ rimraf@2.0.2 βββ semver@1.0.14 βββ slide@1.1.3 βββ tar@0.1.13 βββ uid-number@0.0.3 βββ which@1.0.5
but if I run:
$ npm ls
does it return empty?
Devin Sep 01 '12 at 10:15 2012-09-01 22:15
source share