Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Specify NodeJS 12 as a requirement. #23

Merged
merged 3 commits into from
Mar 21, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"test": "npm run lint"
},
"engines": {
"node": "12.x"
"node": ">=12.x"
Copy link
Contributor

@XhmikosR XhmikosR Mar 19, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This unfortunately means it will affect the version used by the current live Heroku deployment too :/
Scratch that it seems this project is hosted on Now.

Node.js 13.x isn't stable yet and Node.js 14 will be the next LTS which is planned to be released on April, see
https://nodejs.org/en/about/releases/ and nodejs/node#32181

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel I need to clarify.

  • I first attempted to install on a kitchen-counter Mac, an older retired laptop, that was running Node 8. It wouldn't install. After upgrading the kitchen Mac to Node 12 (latest LTS), everything works great. So I added the commit to document Node 12 in the Install section of the Readme.

  • I later installed on my production Mac which is running Node 13. It installed with a warning (see above) Not compatible with your version of node/npm. This runs just fine on Node 13, which is why I made the second commit to modify package.json.engines because the hard-constraint on Node 12 is not appropriate. This will be fine on Node 12+.

Copy link
Contributor

@XhmikosR XhmikosR Mar 19, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, no worries, this should be fine :)

At first I thought the app was deployed on Heroku, which takes into consideration the engines version to choose which version of Node.js is used in production.

But this app is using Zeit Now. Now, I'm not sure if Zeit Now is using the same mechanism. If so, then this change means that the version of the deployed site will be 13.x, which is probably not intended for production.

},
"author": "sagarkarira1992@gmail.com",
"license": "ISC",
Expand Down
4 changes: 3 additions & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,9 @@ curl https://corona-stats.online?format=json

## Local Command (For coloured output)

### Install
Note: NodeJS version 12 recommended. You can download it [here](https://nodejs.org/en/download/).

**Install**

``` sh
npm install coronavirus-tracker-cli -g
Expand Down