What Commandline are you using? CMD or PowerShell?
On Powershell you can just do curl https://github.com/driftyco/ionic2-app-base/archive/master.zip to see if the command line can normally download that file. That should work.
It’s attempting to download from the ionic2-app-base repo, which as the name implies is the base template for an Ionic app. Hence, no matter which template you use it’ll still use the core/base template.
‘ionic-app-scripts’ is not recognized as an internal or external command,
operable program or batch file.
npm ERR! Windows_NT 6.1.7601
npm ERR! argv “C:\Program Files\nodejs\node.exe” “C:\Program Files\nodejs\
node_modules\npm\bin\npm-cli.js” “run” “ionic:serve” “–” “–v2” “–address”
“0.0.0.0” “–port” “8100” “–livereload-port” “35729”
npm ERR! node v7.9.0
npm ERR! npm v4.2.0
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! ionic-app-base@0.0.0 ionic:serve: ionic-app-scripts serve "--v2" "--ad dress" "0.0.0.0" "--port" "8100" "--livereload-port" "35729"
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the ionic-app-base@0.0.0 ionic:serve script 'ionic-app-script
s 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 packag
e,
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 WARN Local package.json exists, but node_modules missing, did you mean to in
stall?
npm ERR! Please include the following file with any support request:
npm ERR! C:\Users\JMP829\AppData\Roaming\npm-cache_logs\2017-05-02T15_52_39
_422Z-debug.log
There was an error serving your Ionic application: There was an error with the s
pawned command: serve
We need to install npm in the unzipped path only if we download manually ?
Also, I’ve already ran npm install -g ionic and npm install -g cordova under C:\Windows\System32 folder. Does this install different from what I need to install again now ?
If you run npm install -g ionic you install the Ionic CLI globally. The CLI helps you to start a new project, build it with Cordova etc.
When you run ionic start hello-world tabs the CLI do this three steps for you.
Downloading the base repo
Downloading the template (tabs, blank, sidemenu, …)
The CLI unzips these two repositories in one folder called by your project name
The CLI runs npm install inside this folder to install all required dependencies (you can find them in the package.json file)
You can do all these four steps without the CLI manually as I posted before.
One question, you are behind a proxy, right? Have you set the proxy settings for npm?
If not you should do it to fix problems with npm. Some Cordova plugins for example also download their files from a GitHub source. To prevent these errors you can follow this guide: https://jhipster.github.io/configuring-a-corporate-proxy/
Because you are not the first person with this problem, I will create a workaround page in the ionic documentation in the next few days.
As Sujan mentioned, apart from PowerShell, is there an alternative to mitigate my actual problem (original error) ? Unable to download from Gihub through Node.js command prompt.
I think there is an issue with in JS of the latest version. It working in ionic 2.2.3 for me. i can download ionic-app-base and ionic2-starter-tab if i install ionic 2.2.3.