4dn-dcic / fourfront

Data portal for submitting and viewing genomic data
https://data.4dnucleome.org
MIT License
13 stars 2 forks source link

Node v20 Upgrade #1910

Closed utku-ozturk closed 1 month ago

utku-ozturk commented 1 month ago

Trello: https://trello.com/c/zw6tQAhQ

Upgrades

Firstly, we had plans to skip v20 and instead jump into v22. Then we gave up since it had some time to be stable. Unless you have a specific requirement for v22, migrating to v20 looks sufficient since GH actions currently supports/recommends v20 as default.

image

How to install/use Node 20 using NVM

To install Node.js 20 using nvm (Node Version Manager) on a Mac, follow these steps:

1. Install nvm (if you haven't already)

If you don't have nvm installed, you can do so by running the following command in your terminal:

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.5/install.sh | bash

After installation, add the following to your .zshrc or .bash_profile (depending on your shell):

export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"

Then, restart your terminal or run:

source ~/.zshrc # or ~/.bash_profile if using bash

2. Verify nvm installation

Run this command to ensure nvm is installed:

nvm --version

If the version appears, you are ready to install Node.js.

3. Install Node.js 20

Now, you can install Node.js version 20 with this command:

nvm install 20

4. Use Node.js 20

After installation, set Node.js 20 as the default version with:

nvm use 20

To make Node.js 20 the default version for every session, run:

nvm alias default 20

5. Verify Node.js 20 Installation

To verify that Node.js 20 is installed and being used, check the version with:

node --version

You should see output like v20.x.x.

utku-ozturk commented 1 month ago

Node.js v20+ upgrade