Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EISGIT error when trying to deploy to Vercel: Appears to be a git repo or submodule. #3701

Closed
timfuhrmann opened this issue Jul 14, 2021 · 2 comments
Labels

Comments

@timfuhrmann
Copy link

timfuhrmann commented Jul 14, 2021

Environment
  • Next.js
  • Dash.js version: 4.0.0-npm
Steps to reproduce
  1. Install the latest version of dash.js using npm
  2. Try to deploy to Vercel
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
npm ERR! code EISGIT
npm ERR! path /vercel/path0/node_modules/dashjs
npm ERR! git /vercel/path0/node_modules/dashjs: Appears to be a git repo or submodule.
npm ERR! git     /vercel/path0/node_modules/dashjs
npm ERR! git Refusing to remove it. Update manually,
npm ERR! git or move it out of the way first.

No problems observed on local machine.

@zbauman3
Copy link

+1

@davemevans
Copy link
Contributor

davemevans commented Jul 20, 2021

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, 🤷

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants