Open grtjn opened 9 years ago
I think drawing the line of how to fix this is going to be hard.
I can see situations where a bug is included in a new minor version and the app is broken without everyone's knowledge. Think possibly should look into a public or semi public CI server that tries a fresh install every so often just to verify nothing breaks due to dependency changes.
Interesting points, but perhaps not entirely what I meant. I was talking about error handling and logging to end user in case one of the automated steps during slush generation fails. For instance during npm install, or bower install, or maybe even somewhere else. Will the generator stop, and report some message, or will it continue as if nothing happened, making it appear to the end user nothing essential went wrong?
My impression is that the generator continues as if nothing went wrong. A simple message stating to rerun the slush generator, or rerun a few manual commands could be nice. Nothing more fancy than that for the moment. And more robust error handling of course, if needed..
Should it just error out and stop the install and basically say how to reinstall? Killing my wifi connection during install gave this. FYI it kept spinning. It may time out at some point..
It looks like we can flat out stop the install process if npm/bower install fails at any step. Basically an on error (can verify it's not a warning I believe) and call process.exit.
Otherwise can just list that it failed at the end. (Sorta pointless as who knows what caused that)
I was thinking of stopping the generator all together, and print a message that suggests to rerun (possibly at a later time if it looked like internet was having trouble).
If you do wait, does slush continue or stop?
I waited 2 minutes. It could possibly continue I can try later. I'm assuming telling just to remove bower/npm installs and rerun their commands?
It looks like it finally errors out then just pauses.
note: "f" was the name of the project since I wasn't feeling creative
I think we need to step back a moment, and see what kind of things could go wrong. Perhaps consider taking npm install and bower install out of the generator. Pushing away for next release..
Just had an issue with imagmin getting an ENOENT error which after a quick google seems to stem from an issue during npm install. Unfortunately no good way to detect that one... Maybe add it to the wiki as a symptom.
I think we need to:
a. vote whether to keep npm/bower install as part of generator at all. b. add a catch for any npm/bower failure in the generator if intend keeping it in.
We could help users by just telling them to run npm install
or bower install
in an error/log message if either fail for any reason.
yes, nice extension of option b..
That's also the standard when running some other generators I've seen.
If keeping the npm/bower install as part of the generator, we do need to make sure that if npm install failed, it won't continue with bower install after that, because any npm failure message gets pushed away in a lot of bower install console messages, and people might not notice npm install failed..
Let's attempt to fix the generator to notice the failure, and provide messages appropriately and such. If that ends up being difficult, we can always decide to cut out these steps, and make them manual steps after all.
Anyone up for this?
Not sure if it is because better fault tolerance in node 5.1.0, but I am unable to get this to break with turning on and off my internet connection during install. Though I wait for minutes, it waits for me to connect again.
Hmm, maybe I should try as well then, I am still running 0.10, which is used on servers a lot as well..
More complicated to test as thought, pushing this away till after UI templates..
Not entirely sure, but have the impression that slow connection, or other mishap during slush generation is not always detected properly, and not always reported back to the end user. Particularly the npm install seems to show issues on occasion. Heard from several people that needed to rerun npm install to make the generated project work for instance.
Can we improve error handling and logging?