Search code examples
node-modulesgit-pushjson-server

Why is json-server's (nodejs plugin) package.json running when I do git push?


Any time I run git push, a package in node_modules runs which breaks my push and I get the error you see in my git error response.

My setup is pretty basic. (Gulp,few other dependencies, and json-server) none of the other projects are trying to build their packages from git push.

I resolved this problem by deleting the package.json of json-server for now. I would still like to understand why git would/node would be forcing this to run.

Thanks anyone!

enter image description here


Solution

  • Alright a friend suggested searching in my .git dir and look at the hooks. He was right. json-server hooks.

    A little backstory in the event you find this question. I was messing around with the json-server package myself (without loading it in a clean dir i know.. silly me). I made a few changes and built the project (which I'm guessing at that point something happened to my projects .git hooks).

    Anyway deleted the hooks and all is well now!

    enter image description here