Long story short:
In the next video I will show you a cool Image recognition API we will start using for this project. This API is actually going to be moved to the backend later in the course (I will explain why that is a good security practice when we get to that part), but to get us started and to have fun at the possibilities we are going to do it all on the frontend first.
HOWEVER: in order for this to work, you will need to have Create React App v4 and not v5 or higher. Why? It's because CRA v5+ uses Webpack 5 as one of the dependencies, and Webpack 5 no longer lets you use the keyword process
in your javascript files. This keyword is actually inside the Clarifai npm package we will install so you will get an error (because it is meant to be used on the backend). Therefore, for JUST THIS SECTION, please use create react app v4. All you have to do is:
go to package.json and update react-scripts to:
"dependencies": { ..... "react-scripts": "4.0.2", ..... },
You can also clone the final repo of this section here. (my code, which uses CRA 4)
Remember, I showed you how to do this in the Keeping Your Projects Up To Date video. Just change the "react-scripts" version to the one you see above (4.0.2), and re-run the npm install
command.
You can read about it here if you want to get into the weeds. Once we move this api to the backend in later sections, you can update the CRA version (although nothing will really change for you other than keeping the project up to date).
Also, take a second to realize how you can read the above and actually understand it.. imagine reading the above when you first started the course! Now, you can read things like the above and solve problems... be proud of yourself for getting this far :)