Skip to content

Instantly share code, notes, and snippets.

@faddah
Created July 30, 2015 02:33
Show Gist options
  • Select an option

  • Save faddah/815f4526466bd910d37b to your computer and use it in GitHub Desktop.

Select an option

Save faddah/815f4526466bd910d37b to your computer and use it in GitHub Desktop.
error in Mac OS X 10.10.4 Yosemite when doing "npm install -g" without "sudo"
$ npm install -g caniuse-cmd
npm ERR! tar.unpack untar error /Users/yuetsu/.npm/caniuse-cmd/1.0.0/package.tgz
npm ERR! Darwin 14.4.0
npm ERR! argv "node" "/usr/local/bin/npm" "install" "-g" "caniuse-cmd"
npm ERR! node v0.12.5
npm ERR! npm v2.11.2
npm ERR! path /usr/local/lib/node_modules/caniuse-cmd
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! Error: EACCES, mkdir '/usr/local/lib/node_modules/caniuse-cmd'
npm ERR! at Error (native)
npm ERR! { [Error: EACCES, mkdir '/usr/local/lib/node_modules/caniuse-cmd']
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! path: '/usr/local/lib/node_modules/caniuse-cmd',
npm ERR! fstream_type: 'Directory',
npm ERR! fstream_path: '/usr/local/lib/node_modules/caniuse-cmd',
npm ERR! fstream_class: 'DirWriter',
npm ERR! fstream_stack:
npm ERR! [ '/usr/local/lib/node_modules/npm/node_modules/fstream/lib/dir-writer.js:35:25',
npm ERR! '/usr/local/lib/node_modules/npm/node_modules/mkdirp/index.js:47:53',
npm ERR! 'FSReqWrap.oncomplete (fs.js:95:15)' ] }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
npm ERR! Please include the following file with any support request:
npm ERR! /Users/yuetsu/npm-debug.log
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment