Hi, I am trying to install react using the following command that Mosh used in his react tutorial:
sudo npm install -g firstname.lastname@example.org
The problem is I get an error message saying “Error: Cannot find module ‘semver’”.
I have attached an image of the entire error message.
To fix this problem, I have run the following code:
sudo rm -rf /usr/local/lib/node_modules
sudo rm -rf ~/.npm
brew uninstall --force node
brew install node
The problem still persists after doing this.