kentcdodds / testing-workshop

A workshop for learning how to test JavaScript applications
http://git.io/testing-workshop
1.36k stars 708 forks source link

Fix for Cannot Find Module 'Semver' on Ubuntu 20.04 #125

Open thomashoddinott opened 3 years ago

thomashoddinott commented 3 years ago

Fix for Cannot Find Module 'Semver' on Ubuntu 20.04

I was unable to run npm run setup --silent and npm run dev until I followed these instructions:

https://cleody.com/post/508/fix-cannot-find-module-semver-error-when-using-ubuntu

sudo apt-get remove nodejs
sudo apt-get remove npm
sudo rm -rf ~/.npm
sudo rm -rf /usr/local/lib/node_modules
curl -0 -L https://npmjs.org/install.sh | sudo sh

I am not sure why this was necessary, but it worked. It appears to be an Ubuntu specific problem.