NVM stands for Node Version Manager. It consists in managing multiple version of NodeJS in your different projects.
More details can be found on official NVM project page on Github, especially for installation.
In all cases you should be in the working directory before launching any command.
To work on current rero-ils and rero-ils-ui with maximal compatibility, we recommend using the following version of NodeJS:
v20.11.0
poetry run invenio webpack clean
.
# list available NodeJS version on your computer
nvm ls
# list all version that exists
nvm ls-remote
# install a specific version
nvm install lts/dubnium
# display current activated NodeJS version
nvm current
If you migrate from a version to another, process like that:
# check which version you have (for example 10.16.3)
nvm current
# migrate from current version to the next one
nvm install lts/erbium --reinstall-packages-from=10.16.3
# uninstall useless version
nvm uninstall 10.16.3
# update package.json
npm i
# upgrade your environment
npm ci