codebuddies / cb-connect

Platform to connect mentors with mentees, accountability partners, and OS project maintainers with new contributors
GNU General Public License v3.0
14 stars 8 forks source link

Define the minimal required node-version to run the app #58

Closed code4cake closed 5 years ago

code4cake commented 5 years ago

In the package.json the engines specifies node as 8.11.4, but this force us to run the application with only that specific version of node. This could be changed to

... rest_of_code
  "engines": {
    "node": ">= 8.11.4"  // => this is the minimum required node-version you need to have to run the application
  },
... rest_of_code

This can be enhanced by adding a .node-version or .nvmrc file - depends which node version manager we decide to go with (nvm vs nodenv) - to the root of the project, i.e:

# .node-version || .nvmrc
8.11.4

This will throw a warning if you try to run the application without having this version of node installed.

Sidenote: node is at 10.15.3 LTS at the moment, so we might want to upgrade.

angelocordon commented 5 years ago

Great feedback @dantesolis -- I don't know enough about Node to have a strong opinion on why we shouldn't do this (although, to your point, we're two major versions behind).

I don't think managing versions of Node is a huge deal, so perhaps a .node-version file is fine or just defining >=10.0.0 in our engine should work. To my understanding, I believe Meteor contains the node and all of our dependencies for us.

Feel free to put a PR 👍

code4cake commented 5 years ago

👍 @angelocordon sending a PR.