Ionic Framework v2入门示例不起作用

时间:2017-05-05 22:05:34

标签: ubuntu ionic-framework ionic2

环境

getline

我对节点v6.10.0和npm v3.10.10也有同样的错误。

我执行的命令

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

ionic start abc blank

cd abc

错误

ionic serve

更新

我尝试使用最新版本的ionic-app-scripts。我跑的时候收到以下警告:

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! ionic-app-base@0.0.0 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 ionic-app-base@0.0.0 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

错误

npm install @ionic/app-scripts@latest --save-dev

非常感谢任何帮助。

1 个答案:

答案 0 :(得分:0)

我终于弄明白了这个问题。

我在EC2 t2.micro实例上运行我的Ubuntu实例。 t2.micro只有1个CPU和1 GB的RAM。

我将EC2实例升级到t2.medium,最终能够构建并运行Ionic Framework v2示例代码。