Closed kumaresan-cgvak closed 7 years ago
Can you download the file https://github.com/driftyco/ionic2-app-base/archive/master.tar.gz manually? How long does it take? How fast is your internet? Anything special about your internet connection or network (monitoring, proxy, cencorship...)?
@piotrowski yes i could download the file manually. Download starts within milli seconds. Speed is around 1.93 Mbps. yes we have a dedicated firewall.
Would it be possible that you terminal can't access the internet because of this Firewall? Maybe try executing wget https://github.com/driftyco/ionic2-app-base/archive/master.tar.gz
to check (although I don't know enoug about Mac to know if this would be enough as a test)
yes i could download it using curl -O https://github.com/driftyco/ionic2-app-base/archive/master.tar.gz
Also it is not the first time am using Ionic CLI. This issue occurs after updating to the Latest CLI only.
have you resolve this problem? if you do ,teach me,thank you !
@RodgerLai not yet...
I also have the same problem
@kumaresan-cgvak i uninstall ionic,then install again and create hello word successfully !
@RodgerLai It doesn't solve the problem. Please team help us with the fix. I can help from my side to collect more information on this issue.
@kumaresan-cgvak @ramsundhar20 @vjunjoced I'm guessing the issue is due to your firewall. (Assuming you all have firewalls.) While curl
and wget
in your terminal may work, node programs such as npm and ionic need separate configuration for firewalls.
This is a known issue with the latest CLI and is being tracked here: https://github.com/driftyco/ionic-cli/issues/2234
Please update this issue if any of you are not using a firewall.
As a workaround, please downgrade to the legacy CLI: npm i -g ionic@legacy
it was very strange for me... after upgrading CLI to 3.0.0 I also start facing this problem
but when I tried same command ionic start myProject blank
from powershell then it worked!
@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.
@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~
@ramsundhar20 The new CLI has a timeout of 25 seconds. I'd like to debug this with you. Obviously using the legacy CLI is not a long-term solution. Can you answer these questions?
Can you download the file https://github.com/driftyco/ionic2-app-base/archive/master.tar.gz manually? How long does it take? How fast is your internet? Anything special about your internet connection or network (monitoring, proxy, cencorship...)?
@dwieeb Please find the answers that you require Yes, I can manually download the file. It took 15 secs I am using a 10 Mbps connection My internet is not under any monitoring or proxy..
When doing wget I noticed that github is doing a redirection for file download. Is it handled in the new CLI. I doubt that would be the cause.
Please let me know, if you need further information.
@ramsundhar20
Yes, the library we're using in the CLI for HTTP (superagent) follows redirects. How long does a typical ionic start
take with the legacy (2.x) CLI for you?
Perhaps simply increasing the timeout will work for you for now. Your Github profile says you're in India. I think a better solution might be to offer a globally distributed CDN download to make this a better experience. I'm not sure if Github does this themselves or not.
Could you please paste the output of running ping codeland.github.com
for a few seconds on the command line?
+1
@Kangmo Please elaborate.
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 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
, blank
or sidemenu
app because it only has a few KB. When I try start a conference
app, 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.
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)
.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.`));
}
})
@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
.
I have the same problem but in ubuntu, I can not find the file :c Windows be like:
path:C:\Users...\AppData\Roaming\npm\node_modules\ionic\dist\lib\start.js
Ubuntu be like: ? :c
@CarlosTheory please try to update ionic to latest version running npm i -g ionic@canary
as @dwieeb said. Don't need to edit start.js manually.
@ricardo-mello I just read it :/ I edited the file in
/usr/lib/node_modules/ionic/dist/lib/start.js
It works, but now I have other problem it says npm stopped working
Disable you Firewall it will work ...
@kanoor Many people use Ionic for their work and have corporate firewalls that they cannot disable.
I solve just close the localhost chrome tab.
I am able to solve this problem by creating a new folder for the project and running the start command with template name and not by selecting the template. eg: ionic start mynewproject sidemenu
npm i -g ionic@canary
great, fix it 。txh
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:
ionic start myApp sidemenu
Post the output of
ionic info
below please global packages:System:
Other information: (e.g. stacktraces, related issues, suggestions how to fix, stackoverflow links, forum links, etc)