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

Conversation

StevenBlack
Copy link
Contributor

When I installed this for local use, I got several warnings and errors. Upgrading to NodeJS latest (version 12) fixed all the issues.

When I installed this for local use, I got several warnings and errors.  Upgrading to NodeJS latest (version 12) fixed all the issues.
@StevenBlack
Copy link
Contributor Author

I have a bit more info on this.

On another machine I have Node v 13.3. When I install according to instructions:

npm install coronavirus-tracker-cli -g

I get the following warnings:

npm WARN notsup Unsupported engine for coronavirus-tracker-cli@0.4.0: wanted: {"node":"12.x"} (current: {"node":"13.3.0","npm":"6.13.2"})
npm WARN notsup Not compatible with your version of node/npm: coronavirus-tracker-cli@0.4.0

I am therefore submitting an additional modification to package.json.engines to include NodeJS versions above 12.x.

@@ -12,7 +12,7 @@
"test": "echo \"Error: no test specified\" && exit 1"
},
"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.

@vercel
Copy link

vercel bot commented Mar 21, 2020

This pull request is being automatically deployed with ZEIT Now (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://zeit.co/sagark/coronavirus-tracker/4ivsg8xr0
✅ Preview: https://coronavirus-tracker-git-fork-stevenblack-master.sagark.now.sh

@sagarkarira sagarkarira reopened this Mar 21, 2020
@sagarkarira sagarkarira merged commit 401b9af into sagarkarira:master Mar 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants