Last active
July 13, 2020 18:31
-
-
Save DanAtkinson/b1bbfd9e5349cfa9f0cd4a6a87db08a5 to your computer and use it in GitHub Desktop.
Updating node.js using nvm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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