S
S
someden2014-09-26 18:10:31
Command line
someden, 2014-09-26 18:10:31

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.

There are no rights, but if you install via sudo , then there are no errors, but still the plugin is not installed. What is the problem?
PS Worth the latest version of OS X 10.9.5

Answer the question

In order to leave comments, you need to log in

3 answer(s)
S
someden, 2014-09-29
@someden

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.

S
Sergey, 2014-09-26
Protko @Fesor

Chown the /Users/admin/.npm directory to your user. You apparently put something through sudo (which global module).

L
lazuren, 2015-09-29
@lazuren

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

A piece of code from the terminal, tell me what I'm doing wrong?
And this error with the command npm install --save-dev gulp
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 question

Ask a Question

731 491 924 answers to any question