Do I need to upload the node_modules folder - creating React apps

Hi,

I’m working on React apps on the Full Stack Engineer course.

I’ve created an app that works fine for the Reddit project, but my question is about deploying that app for people to see/comment on.

When I created the React-app in Node - it created a node_module folder in my app folder. The folder contains ALL the node modules and is over 340mb! (this folder is created everytime I create a new React App)

Do I need to upload this whole folder to GitHib?

I haven’t uploaded it yet, and when I try to deploy the app from Github to Netlify - it fails! Is this becuase the node_module folder is missing - surely I don’t have to upload all of that each time?

Any help greatly appreciated, thanks!

I wouldn’t upload that directory to github, you should have a file with all the packages (package.json), and then as part of deployment you can install the node modules from these list of packages

thanks! Appreciate the response

other developers working on your project can do the same thing, installing all the packages/dependencies using npm install

node_modules should be added to gitignore

Cheers, do you have any experience in deploying from GitHub to Netlify, in these instances?

No experience with netlify, so can’t really help you with that.