DEV Community

Cover image for YOUR CLONED PROJECT FROM GITHUB IS NOT RUNNING ON THAT NEW COMPUTER BECAUSE NODE MODULE WAS NOT PUSHED TOGETHER WITH OTHER FILES
 Mubarak Akinsola
Mubarak Akinsola

Posted on

YOUR CLONED PROJECT FROM GITHUB IS NOT RUNNING ON THAT NEW COMPUTER BECAUSE NODE MODULE WAS NOT PUSHED TOGETHER WITH OTHER FILES

So, I was having an issue with git and Github today.
I was working on a project on my old computer and decided to clone it and continue with the project on my new computer, after pushing my files to Github from my old computer, I then cloned it on my new computer and decided to continue working on it. To my surprise, I started getting error messages, so basically, my project refused to run on my new computer.

After a few hours of not understanding what went wrong, I noticed my node module from my old computer did not get pushed with the other files, reason being that there was a 'gitignore' file in my project.

Ultimately, what the 'gitignore file does is (as the name implies) ignore the node module and does not allow it to get pushed with the rest of the files.

Although you can choose to push your node module too, but it would take a very long time for your files to get uploaded and at the same time when you try to clone it some other time.

What you can do when you clone your project on another computer is to run 'npm i' in the terminal and wait for it to finish doing its thing, after which you can now by then, run your project which should now work properly.

Top comments (0)