2016-05-30 38 views
0

我非常满意迄今为止在Ionic框架上看到的所有内容,这是一个发现球可以玩的孩子,他。iOS上的离子构建和模拟 - 错误

不过,我面临着一些工具配置问题:

安装了Apache 6.2.0科尔多瓦在我的Mac和Xcode 7.2.1和优胜美地;

安装了Ionic 1.7.15客户端;节点4.4.5和NPM 3.9.3;

我设法创建了一个应用程序,打开离子和离子实验室视图,没有问题。

但是当我尝试安装的组件建立在Xcode中,存在一些问题:

一)IOS的是 - 没问题

B)IOS部署 - 各种错误消息:

Npm WARN lifecycle [email protected]~preinstall: can not run in wd% s% s (% s = wd) [email protected] ./src/scripts/check_reqs.js xcodebuild &&/usr/local /lib/node_modules/.staging/ios-deploy-298c9491 
npm ERR! Darwin 14.5.0 
npm ERR! argv "/ usr/local/bin/node" "/ usr/local/bin/npm" "install" "-g" "ios-deploy" 
npm ERR! node v4.4.5 
npm ERR! npm v3.9.3 
npm ERR! path/usr/local/lib/node_modules/ios-deploy/build/Release/ios-deploy 
npm ERR! code ENOENT 
npm ERR! errno -2 
npm ERR! syscall chmod 

npm ERR! ENOENT ENOENT: no such file or directory chmod '/ usr/local/lib/node_modules/ios-deploy/build/Release/ios-deploy' 
npm ERR! ENOENT ENOENT: no such file or directory chmod '/ usr/local/lib/node_modules/ios-deploy/build/Release/ios-deploy' 
npm ERR! ENOENT This is Most Likely not a problem with npm itself 
npm ERR! ENOENT and is related to npm not being able to find the file. 
npm ERR! ENOENT 

npm ERR! Please include The Following file with any support request: 
npm ERR! /Users/myuser/npm-debug.log 

我有问题,在命令的执行:

1)$离子平台添加IOS:

Updated the hooks directory to have execute permissions 
Downloading Default Ionic Resources 
Downloading: https://github.com/driftyco/ionic-default-resources/archive/master.zip 
[=============================] 100% 0.0s 
Done adding default Ionic resources 
Adding icons for platform: ios 
/usr/local/lib/node_modules/cordova/node_modules/configstore/index.js:53 
throw err; 
^ 

Error: EACCES: permission denied, open '/Users/myuser/.config/configstore/insight-cordova.json' 
You do not have access to this file. 

at Error (native) 
at Object.fs.openSync (fs.js: 549: 18) 
at Object.fs.readFileSync (fs.js: 397: 15) 
at Object.create.all.get (/usr/local/lib/node_modules/cordova/node_modules/configstore/index.js:34:26) 
at Object.Configstore (/usr/local/lib/node_modules/cordova/node_modules/configstore/index.js:27:44) 
at new Insight (/usr/local/lib/node_modules/cordova/node_modules/insight/lib/index.js:38:34) 
at Object. <anonymous> (/usr/local/lib/node_modules/cordova/src/telemetry.js:37:15) 
at Module._compile (module.js: 409: 26) 
at Object.Module._extensions..js (module.js: 416: 10) 
at Module.load (module.js: 343: 32) " 
I can not compile with the command "$ ionic build ios" using only "$ sudo ionic build ios 

最后,该命令“须藤$离子效仿IOS”打开模拟器,但不显示该项目...

我很感激,如果任何人有任何方向......

感谢。

Jan Ferrer

+0

你试过'NPM安装-g IOS-deploy'?这不是解决方案,但可能会帮助 –

+0

你好@Medet,是的,我已经尝试了至少两次这个选项,但错误消息保持不变。谢谢。 –

回答

1

对不起,我不确定这是否是评论。我没有足够的积分来这样做。

您是否用sudo安装了科尔多瓦,离子等?

这可能是因为权限问题而发生的,它会阻止成功安装某些模块或访问Mac中的某些文件夹。

你可以在你的文件夹上做chmod来更改权限设置,但我并不真正推荐这种快速修复。

我也收到了在Mac上有类似的问题,并试图避开它个小时后,我终于做了一个新鲜的node使用nvmbrew通过npm安装模块时,为了避免再次使用sudo并重新安装。

安装新鲜感有些痛苦,尤其是因为您需要干净地删除当前的节点安装,但是从长远来看,它将避免解决许可错误,使用sudo等问题。

卸载/安装节点:http://stackabuse.com/how-to-uninstall-node-js-from-mac-osx/

要是你选择去通过这个建议,请更新接下来会发生什么。

+0

感谢您的回答。我相信你的评估是正确的,在许可文件夹和文件时,我会评估一切,然后发布我的报告。 –

0

问题解决。总而言之,我不得不卸载Apache Cordova,IONIC,必须返回到NODE 6.2.0版本,将NPM的4.4.5和3.8.9修改为2.15.1;否则,我们不得不卸载Apache Cordova。并重新安装。

我不得不在OSx终端中使用CHMOD命令,给出所有许可文件和文件夹收费的错误信息。

因此,一切工作令人满意。

+0

如果这是解决方案,请将其标记为解决方案 –

1

我遇到了这个问题,并在this question的评论中找到了解决方案。您可以使用

须藤NPM安装-g IOS部署--unsafe烫发=真

+0

这解决了我的问题。谢谢。 –

相关问题