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

3

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.

Hostinger image

Get n8n VPS hosting 3x cheaper than a cloud solution

Get fast, easy, secure n8n VPS hosting from $4.99/mo at Hostinger. Automate any workflow using a pre-installed n8n application and no-code customization.

Start now

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

Instrument, monitor, fix: a hands-on debugging session

Join Lazar for a hands-on session where you’ll build it, break it, debug it, and fix it. You’ll set up Sentry, track errors, use Session Replay and Tracing, and leverage some good ol’ AI to find and fix issues fast.

Tune in to the full event

DEV is partnering to bring live events to the community. Join us or dismiss this billboard if you're not interested. ❤️