ahmadawais / corona-cli

🦠 Track the Coronavirus disease (COVID-19) in the command line. Worldwide for all countries, for one country, and the US States. Fast response time (< 100ms). To chat: https://twitter.com/MrAhmadAwais/
https://NodeCLI.com
MIT License
1.85k stars 191 forks source link

Support for node.js versions below 12 #83

Closed sampathBlam closed 4 years ago

sampathBlam commented 4 years ago

Great work, first of all !

I tried running corona-cli in my machine which has Node.js 10.16.3 (which isn't that old !! ) and found this error.

× Node version issue!

You are running Node version: 10.16.3
Required version of Node is: 12 or higher.

i Please update your version of Node.js to run this program.

Is there any reason why corona-cli supports only Node.js versions 12 and higher? Is it possible to support lower versions?

ahmadawais commented 4 years ago

Not sure what would that accomplish. Currently 12.16.2 LTS is the long term support version behind that version are old versions not supported anymore, I don't want to maintain or support an old version of Node.js that's not active at all. You should probably upgrade to atleast v12.

ahmadawais commented 4 years ago

In all fairness, the CLI should work fine above v8 but I don't test features for anything below v12 so it's a hard bet.

ahmadawais commented 4 years ago

You could contribute a flag that would overrite this hard requirement at your own risk. Something like --dangerous -d command to signify it's unsafe to use old version and that flag would remove this check.

sampathBlam commented 4 years ago

@ahmadawais : Makes sense.

sampathBlam commented 4 years ago

@ahmadawais : Created a PR for an optional dangerous mode. Pls check.