ionic-cli: Timeout Issue - start
Note: for support questions, please use one of these channels:
https://forum.ionicframework.com/ http://ionicworldwide.herokuapp.com/
Note: for build related issues you can open up an issue on the ionic-app-scripts repo
https://github.com/driftyco/ionic-app-scripts
Please ensure that you are on the latest version of the CLI.
npm view ionic@latest version
Short description of the problem:
Unable to create new project with sidemenu template.
What behavior are you expecting?
To create a sidemenu template app with name myApp using ionic start myApp sidemenu
Steps to reproduce:
- install latest version if CLI. (Version 3.0.0)
- try to create a new project using
ionic start myApp sidemenu
ionic start myApp sidemenu
✔ Creating directory /Users/kumaresan/Desktop/untitled folder/myApp - done!
Fetching app base (https://github.com/driftyco/ionic2-app-base/archive/master.tar.gz)
✖ Downloading - failed!
Error: Timeout of 25000ms reached for https://github.com/driftyco/ionic2-app-base/archive/master.tar.gz
Post the output of ionic info below please
global packages:
@ionic/cli-utils : 1.0.0
Ionic CLI : 3.0.0
System:
Node : v7.10.0
OS : macOS Sierra
Xcode : Xcode 8.3.1 Build version 8E1000a
ios-deploy : 1.9.1
ios-sim : 5.0.13
Other information: (e.g. stacktraces, related issues, suggestions how to fix, stackoverflow links, forum links, etc)
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Reactions: 4
- Comments: 31 (11 by maintainers)
Modify this code!!! path:C:\Users.…\AppData\Roaming\npm\node_modules\ionic\dist\lib\start.js
Object.defineProperty(exports, “__esModule”, { value: true }); const fs = require(“fs”); const path = require(“path”); const zlib = require(“zlib”); const tar = require(“tar”); const chalk = require(“chalk”); const cli_utils_1 = require(“@ionic/cli-utils”); function tarXvfFromUrl(url, destination) { return new Promise((resolve, reject) => { const archiveRequest = cli_utils_1.createRequest(‘get’, url) # .timeout(25000) .on(‘response’, (res) => { if (res.statusCode !== 200) { reject(new Error(
Encountered bad status code (${res.statusCode}) for ${url}\n+This could mean the server is experiencing difficulties right now--please try again later.\n\n+If you're behind a firewall, you can proxy requests by using the HTTP_PROXY or IONIC_HTTP_PROXY environment variables.)); } })I also have the same problem
+1
@ramonornela uninstall and install ionic is not good resolution. run ‘:npm i -g ionic@legacy’ ,that’s working,thank you ! but how do you know the ‘@legacy’ param. teach me,thanks~
@dwieeb No firewalls. I am working in my home in my personal laptop. I don’t think ISP would be blocking github.
npm i -g ionic@legacy
The above command is working perfectly.
@Kangmo @ricardo-mello @fssgh Thanks! I’ll increase the timeout to 3 minutes for now, but I really want to look into speeding this up in the future.
I did not know the conference app was such a beast.
If you like, you can test with
npm i -g ionic@canary.@Kangmo you’re right. We have slow network connections here where I live in Brazil, then I can reproduce the issue perfectly.
I can start a
tabs,blankorsidemenuapp because it only has a few KB. When I try start aconferenceapp, which download file has almost 6MB, I can see the download running through network but the timeout is reached because the internet speed is insufficient.@dwieeb I think that the solution in this case is just increase the timeout.
This morning, I tried to create Ionic app and chose ‘conference’ but failed to download the conference in 25s, which is the time limit with my cell phone which has 3Mbps bandwidth.
But now it successfully downloaded. Looks like it was a server issue, when the server is congested, looks like one can not download the file in 25 seconds.
https://github.com/driftyco/ionic-conference-app/archive/master.tar.gz
Thanks for the great tool~!~!~! I love ionic!
@Kangmo Please elaborate.