Hi, I just started the Ravenous project part 1. And it doesn’t work immediately.
The instructions say to enter create-react-app yourappname in the terminal. I do that, but I get an error message ‘zsh: command not found: create-react-app’. I did follow all the instructions from the previous lessons successfully. So now I’m confused.
I’m wondering: do I have to completely install the react app folder every time I start a new react project? I don’t recall Codecademy saying so in the lessons.
It depends on how you installed create-react-app. If you installed it using the
npm install -g, then it shouldn’t be necessary to install each time.
However, that isn’t the recommended way to use it anymore, and you may have used the method that doesn’t leave it installed globally.
npx create-react-app yourappname
This will fetch the latest version and run it. This works with
node 8.10 or higher and
npm 5.6 or higher, so there is a high probability you meet those version requirements already.
Thanks, I just followed the Codecademy instructions which I thought installed it globally (but I may be wrong). But I’ll use the recommended way then and install it for each react project.
the codecademy instructions are outdated.
that is absolutely recommended, given not all project will have the same version.