Having some issues in our Heroku deploys due to a reliance on our local builds running within our Git repository. As fas as I can tell, this isn't allowed in Heroku - deploys will run within some kind of temporary directory structure that is not a Git repo.
In other cases, I've refactored our deploy code (which primarily uses Gulp) to make use of the Heroku config var SOURCE_VERSION
to get the Git ref.
At the moment though, we're having an issue installing the npm library shared-git-hooks, which is in our devDependencies. The npm installation of this package seems to invoke Git somehow, which Heroku doesn't support. The deploy fails with the error I've pasted in below.
Is there anyway to fix this other than to remove this package from our dependencies?
Installing node modules (package.json)
> shared-git-hooks@1.2.1 install /tmp/build_c13ca0c7e4a74d/PROJECT_NAME-57a29d388e0/node_modules/shared-git-hooks
> node index.js
Symlinking shared-git-hooks runner in .git/hooks
fatal: Not a git repository (or any parent up to mount point /tmp)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
child_process.js:526
throw err;
^
Error: Command failed: git rev-parse --git-dir
fatal: Not a git repository (or any parent up to mount point /tmp)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
at checkExecSyncError (child_process.js:483:13)