David Lozzi
David Lozzi

Reputation: 15875

NPM or Git caching files, can't build my project

I merged my branch with master, git merge master, and had a few conflicts. When I did this, my app was running and threw parser errors about the <<<<<<<... lines as expected.

I resolved the merges and now I'm getting the same error, but there is nothing in my code!

enter image description here

I can search the project for <<<< and find nothing. I've restarted my app npm run start, even switched branches, and it's stuck there. Made a new folder and recloned the project and that cleared it out. Any idea why/how this happened? How do I make sure this doesn't happen again.

Upvotes: 0

Views: 347

Answers (2)

Kustolovic
Kustolovic

Reputation: 172

It seems that a cache problem exists between webpack cache and resolving git conflicts.

the solution is:

  • stop your app
  • remove node_modules/.cache
  • start your app

Upvotes: 1

toujames
toujames

Reputation: 465

It's possible that when you were trying to resolve the merge conflicts, pieces of your code were not marked as resolved.

A personal tip: Using a GUI interface when resolving merge conflicts will help tremendously. Applications like Github Desktop or using Github's own merge conflcit resolve will help better see your changes.

Upvotes: 0

Related Questions