2017-05-05 62 views
0

環境離子框架V2入門實例不工作

AWS EC2 Ubuntu instance: Linux 4.4.0-75-generiC#96-Ubuntu SMP Thu Apr 20 09:56:33 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux 

node v7.10.0 

npm v4.2.0 

cordova v7.0.0 

ionic v2.2.3 

我曾與節點v6.10.0和NPM v3.10.10同樣的錯誤。

命令執行的我

ionic start abc blank

cd abc

ionic serve

錯誤

npm ERR! Linux 4.4.0-75-generic 

npm ERR! argv "/home/ubuntu/apps/node-v7.10.0-linux-x64/bin/node" "/usr/local/bin/npm" "run" "ionic:serve" "--" "--v2" "--address" "0.0.0.0" "--port" "8100" "--livereload-port" "35729" 

npm ERR! node v7.10.0 

npm ERR! npm v4.2.0 

npm ERR! code ELIFECYCLE 

npm ERR! errno 137 

npm ERR! [email protected] ionic:serve: `ionic-app-scripts serve "--v2" "--address" "0.0.0.0" "--port" "8100" "--livereload-port" "35729"` 

npm ERR! Exit status 137 

npm ERR! 

npm ERR! Failed at the [email protected] ionic:serve script 'ionic-app-scripts serve "--v2" "--address" "0.0.0.0" "--port" "8100" "--livereload-port" "35729"'. 

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-app-base package, 

npm ERR! not with npm itself. 

npm ERR! Tell the author that this fails on your system: 

npm ERR!  ionic-app-scripts serve "--v2" "--address" "0.0.0.0" "--port" "8100" "--livereload-port" "35729" 

npm ERR! You can get information on how to open an issue for this project with: 

npm ERR!  npm bugs ionic-app-base 

npm ERR! Or if that isn't available, you can get their info via: 

npm ERR!  npm owner ls ionic-app-base 

npm ERR! There is likely additional logging output above. 

npm ERR! Please include the following file with any support request: 

npm ERR!  /home/ubuntu/.npm/_logs/2017-05-05T21_47_32_471Z-debug.log 

There was an error serving your Ionic application: There was an error with the spawned command: serve 

更新

我試着得到最新版本的ionic-app-scripts。我碰到下面的警告,當我運行:

npm install @ionic/[email protected] --save-dev

錯誤

[email protected]:~/dev/abc$ npm install @ionic/[email protected] --save-dev 
npm WARN deprecated [email protected]: Please update to the latest object-keys 
[email protected] /home/ubuntu/dev/abc 
└── @ionic/[email protected] 

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected]^1.0.0 (node_modules/chokidar/node_modules/fsevents): 

npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"}) 

任何幫助將不勝感激。

+0

感謝您清理我的問題suraj,現在的格式看起來好多了! – sizzle

回答

0

我終於明白了這個問題。

我在EC2 t2.micro實例上運行我的Ubuntu實例。 t2.micro只有1個CPU和1 GB的內存。

我將EC2實例升級到t2.medium,最終能夠構建並運行Ionic Framework v2示例代碼。