在Mac OS小牛NPM安装问题 [英] NPM installation issues on Mac OS Mavericks

查看:141
本文介绍了在Mac OS小牛NPM安装问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想获得与AngularJS,和的NodeJS Ruby on Rails的交手。当试图安装NPM包,比如自耕农,咕噜咕噜等我收到这是我下面列出我在终端的错误:

I am trying to get to grips with AngularJS, NodeJS and Ruby on Rails. When trying to install npm packages like yeoman, grunt etc. I receive an error in my Terminal which I have listed below:

npm ERR! Error: EACCES, open '/Users/Jabane/.npm/glob/3.2.11/package/package.json.25961'
npm ERR! { [Error: EACCES, open '/Users/Jabane/.npm/glob/3.2.11/package/package.json.25961']
npm ERR! errno: 3,
npm ERR! code: 'EACCES',
npm ERR! path: '/Users/Jabane/.npm/glob/3.2.11/package/package.json.25961',
npm ERR! parent: 'browserify' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
npm ERR! System Darwin 13.0.0
npm ERR! command "node" "/usr/local/bin/npm" "install" "-g" "browserify"
npm ERR! cwd /Users/Jabane
npm ERR! node -v v0.10.26
npm ERR! npm -v 1.4.16
npm ERR! path /Users/Jabane/.npm/glob/3.2.11/package/package.json.25961
npm ERR! code EACCES
npm ERR! errno 3
npm ERR! stack Error: EACCES, open '/Users/Jabane/.npm/glob/3.2.11/package/package.json.25961'
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /Users/kJabane/npm-debug.log
npm ERR! not ok code 0

什么可能是在这种情况下的问题?您的帮助是高度AP preciated。

What might be the issue in this case? Your assistance is highly appreciated.

感谢

推荐答案

这是一个权限问题。您需要preFIX您的NPM安装是 须藤命令,例如:

This is a permissions issue. You need to prefix your npm install command with sudo, e.g.:

sudo npm install yeoman

它会提示你输入你的用户帐户的密码;并受到了正确的密码被提供,然后将正确的安装软件包。

It will prompt you for your User Account's password; and subject to the correct password being provided, will then install the packages correctly.

这篇关于在Mac OS小牛NPM安装问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆