Skip to content

chore(nvmrc): adds nvmrc to pin node version #735

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

Merged
merged 1 commit into from
Jan 28, 2022

Conversation

seaerchin
Copy link
Contributor

Problem

Isomer doesn't pin the node version. This might lead to incompatible versioning and unexpected build errors. This occurs when node version is 17 but node-sass is version 4.xx, where node cannot build the package.

Solution

  1. Pin the node version using a .nvmrc file. This was preferred as it serves 2 purposes: first, it allows devs developing locally to use the correct version of node, assuming that they have nvm installed; next, it allows netlify to use the .nvmrc to build the site.
  2. Node version was set to 14.xx because 14.xx is a LTS version, which guarantees support till 2023 (odd numbered versions only have 6 months worth of support). We could use 16.xx as the LTS version but because my local install of node-sass with 17.xx failed, i opted for 14.xx instead.

we use a LTS version to guarantee support; 14 is used over 16 because that's the one i've installed.
node-sass breaks when node is version 17. this step is also needed for CI to ensure a consistent
environment
@seaerchin
Copy link
Contributor Author

will also do this on the backend repo once approved

Copy link
Contributor

@alexanderleegs alexanderleegs left a comment

Choose a reason for hiding this comment

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

Good catch, thanks for setting this up!

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.

3 participants