Skip to content

Instantly share code, notes, and snippets.

@DanAtkinson
Last active July 13, 2020 18:31
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DanAtkinson/b1bbfd9e5349cfa9f0cd4a6a87db08a5 to your computer and use it in GitHub Desktop.
Save DanAtkinson/b1bbfd9e5349cfa9f0cd4a6a87db08a5 to your computer and use it in GitHub Desktop.
Updating node.js using nvm
# This is not to be used as an actual file but is more as a reminder for myself of the steps needed in the command line.
# I could probably mash this into a workable file.
# Get all current packages
npm list -g --depth=0
# Make a note of the packages. grunt and jshint are the important ones for me.
# Sometimes npm tells you that there is an update available. This can be done using the following:
npm i npm
# Now install latest
nvm install latest
# Now let's say node.js 10.0.0 was just installed.
nvm use 10.0.0
# The list should be empty but may inform you of an update available.
npm list -g --depth=0
# Again, sometimes npm tells you that there is an update available. This can be done using the following:
npm i npm
# Now re-install global packages.
npm install -g jshint
npm install -g grunt
# Sometimes, when you run grunt, you may get an error.
# https://github.com/jakearchibald/wittr/issues/20
# Run the following command:
npm rebuild node-sass
#...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment