We all know how “Stable” Front End technologies are.
Sometimes you need to work on different projects and switch your node versions. Every time, when I change node version to the newer one using n, I run into issues with running
Here is an example.
Currently, I’m on version 7.8.0. When I go to global packages folder (
/usr/local/lib/node_modules) I see the following picture:
Which is totally fine! Here I checked my node version (which is in fact 7.8.0) and verified that I don’t have any outdated packages.
However, let’s see what would happen if I change my node version to an old one (for example 0.10.28) and then switch it back to 7.8.0. Then I would verify outdated packages once again.
It turned out that I have an outdated
npm and missing
Every time you’re switching node versions:
- Navigate to the folder with the global packages –
sudo npm install -g npm@latest– to have the latest version of npm
(sudo) npm updateto stay with the latest
npmand other dependencies