2016-11-04 70 views
0

我使用Ionic 2构建了一个混合应用程序。
我得到了一台Windows PC并使用Mac虚拟机箱进行Xcode。
我可以在浏览器上运行该应用程序,并在我的窗口中运行安卓。
问题是当我移动到Mac我在节点JS做同样的事情,我得到的错误。
我用在终端的线构建产品失败:产生EACCES与ionic2

ionic start/run/emulate/build Vme2 

sudo ionic start/run/emulate/build Vme2 

没有工作 这是错误我得到

> [email protected] build /Users/amitaimazliah/Desktop/Vme2 
> ionic-app-scripts build 
[08:38:07] ionic-app-scripts 0.0.38 
[08:38:07] build prod started ... 
[08:38:07] clean started ... 
[08:38:07] clean finished in 3 ms 
[08:38:07] copy started ... 
[08:38:07] ngc started ... 
[08:38:07] copy finished in 262 ms 
[08:38:07] build prod failed: spawn EACCES 
[08:38:07] ionic-app-script task: "build" 
[08:38:07] Error: spawn EACCES 
npm ERR! Darwin 14.0.0 
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "build" 
npm ERR! node v6.9.1 
npm ERR! npm v3.10.8 
npm ERR! code ELIFECYCLE 
npm ERR! [email protected] build: `ionic-app-scripts build` 
npm ERR! Exit status 1 
npm ERR! 
npm ERR! Failed at the [email protected] build script 'ionic-app-scripts build'. 
npm ERR! Make sure you have the latest version of node.js and npm installed. 
npm ERR! If you do, this is most likely a problem with the ionic-hello-world package, 
npm ERR! not with npm itself. 
npm ERR! Tell the author that this fails on your system: 
npm ERR!  ionic-app-scripts build 
npm ERR! You can get information on how to open an issue for this project with: 
npm ERR!  npm bugs ionic-hello-world 
npm ERR! Or if that isn't available, you can get their info via: 
npm ERR!  npm owner ls ionic-hello-world 
npm ERR! There is likely additional logging output above. 
npm ERR! Please include the following file with any support request: 
npm ERR!  /Users/amitaimazliah/Desktop/Vme2/npm-debug.log 
Caught exception: 

undefined 



Mind letting us know? https://github.com/driftyco/ionic-cli/issues 



[08:38:07] lint started ... 

[08:38:08] tslint: src/pages/home/home.ts, line: 57 

      Unused method: 'setNewPhotos' 

     L57: private setNewPhotos() 

[08:38:08] lint finished in 1.27 s 

(node:2376) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: channel closed 

任何想法,我究竟做错了什么? 感谢

回答

0

当构建app.Can您尝试使用此命令'

ionic hooks add 

欢呼你有问题!

+0

您的回答不完整。请编辑它。 – MikeJRamsey56

+0

我使用的命令,并仍然得到同样的错误 – Amitai

+0

我发现 – Amitai