build prod failed:使用ionic2生成EACCES

时间:2016-11-04 16:03:58

标签: ionic-framework ionic2

我使用Ionic 2构建混合应用程序。
我有一个Windows PC和Xcode使用mac虚拟盒 我可以在浏览器和Android上运行应用程序就好了 问题是,当我搬到mac时,我在节点JS上做同样的事情,我得到了错误。
我在终端

中使用了那些行
ionic start/run/emulate/build Vme2

sudo ionic start/run/emulate/build Vme2

无效 这是我得到的错误

> ionic-hello-world@ 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! ionic-hello-world@ build: `ionic-app-scripts build`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the ionic-hello-world@ 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

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

1 个答案:

答案 0 :(得分:-1)

构建app时遇到问题。您可以尝试使用此命令'

ionic hooks add

干杯!