-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
process.env.INIT_CWD is undefined!!! #640
Comments
I have the same problem using Husky v4.2.1: The installer can't find A workaround is to supply them on the command line:
(This also works with Steps to reproduce:
|
If you want to re-run Husky install script, you can run |
Thanks for the reply (and for the great module)!
Yarn agrees with you: https://next.yarnpkg.com/advanced/migration#call-your-scripts-through-yarn-node-rather-than-node It provides the
It looks like there's no Yarn v1.x solution (other than falling back to |
This was also happening to me when running a normal |
We had the same issue. Update the npm version to the latest. |
While using versión
|
For me, opencollective-postinstall || exit 0
I opened about this issue here. Edit: The above error is due to wrong npm scrip-shell setting as explained in the issue. |
Run into this today. |
I've the same issue with yarn or npm. If I try to install manually I get:
my setup: npm: 7.0.6 |
I had the same issue, node js v15.3.0, husky 5.0.4. |
I think it's fixed with most recent versions of npm. Feel free to create a new issue if not or if I missed something 👍 |
when i install husky v4.x.x, I found below error.
npm、git、node version is in below screenshot.

I saw the source code. Found:
process.env.INIT_CWD is undefined
husky version is in below image:

The text was updated successfully, but these errors were encountered: