I’m revising that entire chapter for the book, and will post the updated version here shortly that uses it instead of the manual approach we are talking about here.
i just created my react app by installing the create-react-app . But i have a issue where if we work on the propTypes it throws an error saying that ‘PropTypes’ is not defined. (no-undef). you can view the issue here https://stackoverflow.com/questions/45692537/proptypes-is-not-defined .
It looks like the solution for this is to use the eslint 3.* where create-react-app uses the latest eslint 4.* - Do you know how to downgrade the verison to eslint 3.* - If so can you post the steps .
Hello Kirupa, unfortunately I am going to add to the create-react-app installation questions.
I am using Windows 10 with npm 5.5.1 and node 8.9.1.
create-react-app installs successfully, but when I try to create a project I get one of these errors:
‘create-react-app’ is not recognized as an internal or external command,
operable program or batch file
bash: create-react-app: command not found
I’ve tried with the windows and node command prompts and gone through several suggestions from stack overflow and the github create-react-app page. I’ve made several changes to my Environment variables as suggested, but so far no luck. Just thought I’d try one more forum. Thank you.
Thanks for the reply, Kirupa.
I did try those articles before, and I tried those steps again today with the node and windows command prompts and even Power Shell as an admin, but I’m still not able to create a new create-react app.
Specifically, this is what I did:
Added /usr/local/bin/ to my user and system variables in the Environmental Variables dialogue.
I also tried:
$ npm config set prefix /usr/local
$ npm install -g create-react-app
$ create-react-app my-app
create-react-app, gulp, and yarn get installed to this folder: C:\usr\local
But after running the gulp, yarn, or create-react-app commands, I end up with errors like:
‘create-react-app’ is not recognized as an internal or external command,
operable program or batch file.
Any other thoughts? If not, I’ll just have to try on a different computer. Thank you.
That didn’t work for my desktop Window computer either, so I tried on a Window 10 laptop that didn’t have that much software on it yet, and the create-react-app installation worked.
btw, I’ve found your book and tutorials easier to follow than some of the other React ones out there, so thanks for the help and work you do.
Either way. Whatever you feel comfortable with to delete and add files. The next step also includes editing a file, so having an editor handy will help too. And if you have an editor that includes its own file management (Sublime, Code, etc.), that can also be used.