Answer the question
In order to leave comments, you need to log in
Why do I get errors when installing gulp plugins on OS X?
On the command line I type npm install gulp-jade gulp-livereload --save-dev
and this is what it says:
pool-192:project admin$ npm install gulp-jade gulp-livereload --save-dev
npm WARN package.json [email protected] No description
npm WARN package.json [email protected] No repository field.
npm WARN package.json [email protected] No README data
npm ERR! Darwin 13.4.0
npm ERR! argv "node" "/usr/local/bin/npm" "install" "gulp-jade" "gulp-livereload" "--save-dev"
npm ERR! node v0.10.32
npm ERR! npm v2.0.2
npm ERR! path /Users/admin/.npm/tiny-lr/0.1.4
npm ERR! code EACCES
npm ERR! errno 3
npm ERR! Error: EACCES, mkdir '/Users/admin/.npm/tiny-lr/0.1.4'
npm ERR! { [Error: EACCES, mkdir '/Users/admin/.npm/tiny-lr/0.1.4']
npm ERR! errno: 3,
npm ERR! code: 'EACCES',
npm ERR! path: '/Users/admin/.npm/tiny-lr/0.1.4',
npm ERR! parent: 'gulp-livereload' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
Answer the question
In order to leave comments, you need to log in
In short, I deleted everything, reinstalled OS X, installed
node.js. I tried installing gulp without sudo: I got the
same error "npm ERR! Error: EACCES, mkdir", etc.
Installed with sudo:
And everything worked, modules are now installed without requiring sudo, no more errors.
Chown the /Users/admin/.npm directory to your user. You apparently put something through sudo (which global module).
Sergey Protko : I have the same trouble, what folders I just didn't chown $(whoami) still a lot of errors!
Lazuren:htdocs lazuren$ chown -- r `lazuren` /usr/local/lib/node_modules/npm
-bash: lazuren: command not found
chown: r: illegal user name
npm WARN locking Error: EACCES, open '/Users/lazuren/.npm/_locks/staging-9d4937ef9a213244.lock'
npm WARN locking at Error (native)
npm WARN locking /Users/lazuren/.npm/_locks/staging-9d4937ef9a213244.lock failed { [Error: EACCES, open '/Users/lazuren/.npm/_locks/staging-9d4937ef9a213244.lock']
npm WARN locking errno: -13,
npm WARN locking code: 'EACCES',
npm WARN locking path: '/Users/lazuren/.npm/_locks/staging-9d4937ef9a213244.lock' }
[email protected] /Applications/MAMP/htdocs/test_gulp
└─┬ [email protected]
├── [email protected]
├─┬ [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ ├─┬ [email protected]
│ │ └── [email protected]
│ ├── [email protected]
│ └── [email protected]
├── [email protected]
├─┬ [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ ├─┬ [email protected]
│ │ ├── [email protected]
│ │ └─┬ [email protected]
│ │ ├─┬ [email protected]
│ │ │ ├── [email protected]
│ │ │ └── [email protected]
│ │ └─┬ [email protected]
│ │ ├── [email protected]
│ │ └─┬ [email protected]
│ │ └─┬ [email protected]
│ │ └── [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ ├─┬ [email protected]
│ │ ├── [email protected]
│ │ ├── [email protected]
│ │ ├── [email protected]
│ │ ├── [email protected]
│ │ ├── [email protected]
│ │ ├─┬ [email protected]
│ │ │ ├── [email protected]
│ │ │ ├── [email protected]
│ │ │ └── [email protected]
│ │ ├── [email protected]
│ │ └── [email protected]
│ ├─┬ [email protected]
│ │ └─┬ [email protected]
│ │ └── [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ ├─┬ [email protected]
│ │ ├─┬ [email protected]
│ │ │ ├── [email protected]
│ │ │ ├── [email protected]
│ │ │ ├── [email protected]
│ │ │ ├── [email protected]
│ │ │ ├── [email protected]
│ │ │ └── [email protected]
│ │ └── [email protected]
│ └─┬ [email protected]
│ ├── [email protected]
│ └── [email protected]
├── [email protected]
├─┬ [email protected]
│ ├── [email protected]
│ ├─┬ fin[email protected]
│ │ └─┬ [email protected]
│ │ ├── [email protected]
│ │ ├── [email protected]
│ │ └── [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ └── [email protected]
├── [email protected]
├─┬ [email protected]
│ ├─┬ [email protected]
│ │ └─┬ [email protected]
│ │ └── [email protected]
│ ├── [email protected]
│ └── [email protected]
├── [email protected]
├── [email protected]
├─┬ [email protected]
│ └── [email protected]
├─┬ [email protected]
│ └── [email protected]
└─┬ [email protected]
├─┬ [email protected]
│ └── [email protected]
├─┬ [email protected]
│ ├── [email protected]
│ ├─┬ [email protected]
│ │ └── [email protected]
│ ├─┬ [email protected]
│ │ └─┬ [email protected]
│ │ ├── [email protected]
│ │ └── [email protected]
│ ├── [email protected]
│ ├─┬ [email protected]
│ │ └── [email protected]
│ └── [email protected]
├─┬ [email protected]
│ └─┬ [email protected]
│ └─┬ [email protected]
│ ├─┬ [email protected]
│ │ ├── [email protected]
│ │ └── [email protected]
│ ├── [email protected]
│ └─┬ [email protected]
│ ├── [email protected]
│ └── [email protected]
├── [email protected]
├─┬ [email protected]
│ └── [email protected]
├─┬ [email protected]
│ ├── [email protected]
│ └── [email protected]
├─┬ [email protected]
│ └── [email protected]
└─┬ [email protected]
└── [email protected]
npm WARN EPACKAGEJSON [email protected] No description
npm WARN EPACKAGEJSON [email protected] No repository field.
npm WARN EPACKAGEJSON [email protected] No license field.
npm ERR! Darwin 14.5.0
npm ERR! argv "node" "/usr/local/bin/npm" "install" "--save-dev" "gulp"
npm ERR! node v0.12.5
npm ERR! npm v3.3.4
npm ERR! path /Users/lazuren/.npm/_locks/staging-9d4937ef9a213244.lock
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! Error: EACCES, open '/Users/lazuren/.npm/_locks/staging-9d4937ef9a213244.lock'
npm ERR! at Error (native)
npm ERR! { [Error: EACCES, open '/Users/lazuren/.npm/_locks/staging-9d4937ef9a213244.lock']
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! path: '/Users/lazuren/.npm/_locks/staging-9d4937ef9a213244.lock' }
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! /Applications/MAMP/htdocs/test_gulp/npm-debug.log
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question