环境
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
i与节点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! 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
update
我尝试获取最新版本的Ionic-App-Scripts。运行时我会收到以下警告:
npm install @ionic/app-scripts@latest --save-dev
错误
ubuntu@foobar:~/dev/abc$ npm install @ionic/app-scripts@latest --save-dev
npm WARN deprecated object-keys@0.2.0: Please update to the latest object-keys
ionic-app-base@0.0.0 /home/ubuntu/dev/abc
└── @ionic/app-scripts@1.3.7
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.1: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
任何帮助将不胜感激。
我终于找出了问题。
我在EC2 T2.Micro实例上运行了我的Ubuntu实例。T2.Micro只有1个CPU和1 GB的RAM。
我将我的EC2实例升级到t2.Medium,并最终能够构建和运行离子框架V2示例代码。