I wanted to start learning React so we could explore web development as a class, but I ran into a wall.
First I tried running
#Do not Run this. It is the problem!
npx create-react-app
But I got all kinds of error messages warning that packages installed were dangerous. So I saw that you should use something like this instead.
npx create-next-app@latest
Worked great on my laptop at home, as expected, it didn’t work on the school computer. npx runs executables and they don’t let us do that. It is a problem I have seen before, and I knew a workaround. Move to the virtual machine! Over on the virtual machine, I tried the command again, but I got some errors. I searched through blogs and nothing was working. Just the same errors again and again.
I was about to give up when I saw something stating I need version 18 or higher and I was only on version 12.
I ran a couple updates
sudo apt update
sudo apt upgrade
Then I followed the directions from pheonixnap.com and we were in business!
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash
Close then open the terminal, then update node. You can see the current version here. At the time I write this, I used 20.11.1
nvm ls-remote
nvm install [version.number]
nvm use [version number]
Now go ahead and
npx create-next-app@latest