首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
社区首页 >问答首页 >ngCordova保龄球错误--有什么办法解决吗?

ngCordova保龄球错误--有什么办法解决吗?
EN

Stack Overflow用户
提问于 2015-09-20 14:13:47
回答 3查看 315关注 0票数 5

我试图确保我使用的是最新版本,因为我的ngCordova媒体插件由于某些原因无法工作。

我知道这个错误:

代码语言:javascript
运行
AI代码解释
复制
npm WARN locking Error: EACCES, open '/Users/SubjectiveEffect/.npm/_locks/bower-e8debc5417026b57.lock'
npm WARN locking     at Error (native)
npm WARN locking  /Users/SubjectiveEffect/.npm/_locks/bower-e8debc5417026b57.lock failed { [Error: EACCES, open '/Users/SubjectiveEffect/.npm/_locks/bower-e8debc5417026b57.lock']
npm WARN locking   errno: -13,
npm WARN locking   code: 'EACCES',
npm WARN locking   path: '/Users/SubjectiveEffect/.npm/_locks/bower-e8debc5417026b57.lock' }
npm ERR! Darwin 14.5.0
npm ERR! argv "node" "/usr/local/bin/npm" "install" "-g" "bower"
npm ERR! node v0.12.7
npm ERR! npm  v2.11.3

npm ERR! Attempt to unlock /usr/local/lib/node_modules/bower, which hasn't been locked
npm ERR! 
npm ERR! If you need help, you may report this error at:
npm ERR!     <https://github.com/npm/npm/issues>

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/SubjectiveEffect/myApp/npm-debug.log

我不知道怎么解决这个问题。

有什么想法吗?

编辑:我做了一些整理,卸载和重新安装。现在,当我尝试"bower“时,我得到了这个错误

代码语言:javascript
运行
AI代码解释
复制
"bower cached git://github.com/driftyco/ng-cordova.git#0.1.12-alpha
bower validate 0.1.12-alpha against git://github.com/driftyco/ng-cordova.git#*
bower ECMDERR Failed to execute "git ls-remote --tags --heads        git://github.com/driftyco/ng-cordova.git", exit code of #69 Agreeing to the    Xcode/iOS license requires admin privileges, please re-run as root via sudo.

Additional error details:
Agreeing to the Xcode/iOS license requires admin privileges, please re-run as root via sudo."

但是如果我试图用sudo来运行它,我会被告知:

代码语言:javascript
运行
AI代码解释
复制
"bower ESUDO Cannot be run with sudo

Additional error details:
 Since bower is a user command, there is no need to execute it with superuser permissions.
If you're having permission errors when using bower without sudo, please spend a few minutes learning more about how your system should work and make any necessary repairs."

有什么想法吗?

EN

回答 3

Stack Overflow用户

回答已采纳

发布于 2015-09-29 13:01:31

错误是指出了接受Xcode/iOS许可协议的问题,Xcode/ iOS许可协议是cordova的一个依赖项(为了使iOS仿真工作)。

我想Xcode已经被npm/bower安装了,您只需要第一次打开它(Cmd,然后键入Xcode)就可以接受许可协议,然后重新运行bower install ngCordova

如果还没有安装Xcode,那么手动安装Xcode(详细信息见这里 )、打开它一次并重新运行bower install ngCordova可能不会那么麻烦。

顺便说一句,ilj是对的,在sudo下运行npm或bower通常是一种不好的做法。这导致了各种各样的虫罐。

票数 3
EN

Stack Overflow用户

发布于 2015-09-28 13:14:17

bower抱怨说,您将其作为root运行,这通常是一种糟糕的做法。你需要运行它作为“保龄球-允许-根”。

票数 2
EN

Stack Overflow用户

发布于 2015-10-29 03:48:00

我和Ionic也经历过同样的问题。原因是xCode被更新到一个更新的版本,而我没有接受这些条款,也没有在更新之后启动它。

只需打开xCode,再试一次。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/32684858

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档
查看详情【社区公告】 技术创作特训营有奖征文