本文介绍了在Mac上安装Cordova时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图使用npm安装Cordova,但是花了一个多小时,然后我放弃了.后来我尝试遵循 http://cordova.apache.org/的指示,并且在我执行了npm install -g ios-deploy.

这是我在命令行中看到的:

有人可以给我一些提示吗?谢谢!

解决方案

出于完整性考虑,@ Sam003的答案是正确的,使用--unsafe-perm=true是按节点推荐的在MacOS 10.11及更高版本下安装模块的方法./p>

从nmp安装:

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!! WARNING: You are on OS X 10.11 El Capitan or greater, you may need to add the
!!!! WARNING:   `--unsafe-perm=true` flag when running `npm install`
!!!! WARNING:   or else it will fail.
!!!! WARNING: link:
!!!! WARNING:   https://github.com/phonegap/ios-deploy#os-x-1011-el-capitan
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

I was trying to install Cordova by using npm, but it took more than one hour, and then I gave up. Later I tried to follow the instruction from http://cordova.apache.org/, and the error occurred when I executed npm install -g ios-deploy.

Here is what I get in command line:

Could anyone give me some hints? Thanks!

解决方案

For completeness sake, @Sam003's answer is right, using the --unsafe-perm=true is the recommended-by-node way to install modules under MacOS 10.11 and later.

From an nmp install:

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!! WARNING: You are on OS X 10.11 El Capitan or greater, you may need to add the
!!!! WARNING:   `--unsafe-perm=true` flag when running `npm install`
!!!! WARNING:   or else it will fail.
!!!! WARNING: link:
!!!! WARNING:   https://github.com/phonegap/ios-deploy#os-x-1011-el-capitan
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

这篇关于在Mac上安装Cordova时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-29 11:19