Closed timfuhrmann closed 3 years ago
+1
Seems the npm postinstall
step defined in package.json always installs the precommit hook into the local .git/hooks/pre-commit
folder. This causes a .git
folder to exist within node_modules/dashjs
, which in turn causes the OP's error where dashjs is a dependency.
This postinstall step should probably only be done if being installed "locally" ie for development, rather than as a dependency, since library users wouldn't need the commit hook anyway.
How to acheive this, 🤷
Environment
Steps to reproduce
Observed behavior
Build fails throwing the
EISGIT
error.Regenerating
package-lock.json
or ignoring build cache resolves the issue for the initial deployment, the second one will fail again.Console output
No problems observed on local machine.