Skip to content
This repository has been archived by the owner on Apr 24, 2024. It is now read-only.

Switch from Nodesource scripts to nvm for installing Node.js #539

Merged
merged 2 commits into from
Oct 19, 2023

Conversation

engineervix
Copy link
Member

@engineervix engineervix commented Sep 21, 2023

Description of Changes Made

Nodesource will no longer be using the installation scripts that we've been using for a while. You've probably already come across the deprecation notice when buiding containers:

  This script, located at https://deb.nodesource.com/setup_X, used to
  install Node.js is deprecated now and will eventually be made inactive.

  Please visit the NodeSource distributions Github and follow the
  instructions to migrate your repo.
  https://github.com/nodesource/distributions 

  The NodeSource Node.js Linux distributions GitHub repository contains
  information about which versions of Node.js and which Linux distributions
  are supported and how to install it.
  https://github.com/nodesource/distributions

Rather than switching to the new installation process, this MR updates the setup to use nvm.

I have also added a commit to ensure consistency of Node versions between .nvmrc file and Dockerfile.

How to Test

Follow the build instructions in the README. Once the containers are built, SSH into the web container via fab sh and check that node and npm commands are available, for instance:

node -v
npm -v

MR Checklist

  • Add a description of your pull request and instructions for the reviewer to verify your work.
  • If your pull request is for a specific ticket, link to it in the description.
  • Stay on point and keep it small so the merge request can be easily reviewed.
  • Consider adding unit tests, especially for bug fixes. If you don't, tell us why. N/A
  • Tests and linting passes.
  • Consider updating documentation. If you don't, tell us why. N/A
  • If relevant, list the environments / browsers in which you tested your changes. N/A

Copy link
Contributor

@victoriachan victoriachan left a comment

Choose a reason for hiding this comment

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

Looks good. I got an error regarding postgresql-client. I've added a code suggestion. Other than that, it is working well.

Dockerfile Outdated Show resolved Hide resolved
because Nodesource will no longer be using the installation scripts
that we've been using for a while

nodesource/distributions#1438 (comment)
.nvmrc has version 16 specified
@engineervix engineervix force-pushed the support/node-installer-update branch from ca07e8e to 72c3509 Compare October 16, 2023 10:13
Copy link
Contributor

@victoriachan victoriachan left a comment

Choose a reason for hiding this comment

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

Looks good and works well. Thanks for making the changes!

@victoriachan victoriachan self-assigned this Oct 19, 2023
@victoriachan victoriachan merged commit fa3d23e into main Oct 19, 2023
@victoriachan victoriachan deleted the support/node-installer-update branch October 19, 2023 13:53
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants