1

I tried Husky as an easy git hook manager, and added the following line to my scripts in the 'package.json' file:

"prepush": "webpack --config webpack.prod.js && git add ./dist_prod/* && git commit -m \"Automatic commit - webpack build prod\""

The problem is that everytime I try to do a git push, it fails, throwing this error:

Cannot find module 'C:\c\Program Files\nodejs\node_modules\npm\bin\npm-cli.js'

I understand the error is in this path, as "C:\c\" is obviously wrong, but I don't know how to fix it.

Nicolò Gasparini
  • 2,228
  • 2
  • 24
  • 53

0 Answers0