Closed dlants closed 7 months ago
I should mention, since this repo uses husky v7, I was able to work around this issue by setting:
export HUSKY_SKIP_INSTALL="true"
Thanks @dlants for capturing this issue. It looks like you found a valid workaround for your issue. I will talk to our PM to discuss getting this prioritized
We also faced similar issue. when we are using jhipster framework application.
npm install -g
./gradlew -Pprod -Pwar bootWar --no-daemon -PbuildNumber=$GITHUB_RUN_NUMBER
shell: /bin/bash --noprofile --norc -e -o pipefail {0}
env:
JAVA_HOME_11_x64: /home/actions/actions-runner/_work/_tool/jdk/11.0.15/x64
JAVA_HOME: /home/actions/actions-runner/_work/_tool/jdk/11.0.15/x64
JAVA_HOME_11_X64: /home/actions/actions-runner/_work/_tool/jdk/11.0.15/x64
NEXUS_USERNAME:
NEXUS_PASSWORD:
npm WARN config global --global
, --local
are deprecated. Use --location=global
instead.
npm ERR! code 127
npm ERR! path /home/actions/actions-runner/_work/sci-mycloud/sci-mycloud
npm ERR! command failed
npm ERR! command sh -c husky install
npm ERR! sh: husky: command not found
This should be resolved by #238
Description
@newrelic/node-native-metrics is a dependency of one of my projects. When running
yarn install --verbose
on the project, buildingnode-native-metrics
failed with:It seems like yarn tried to run the prepare script, which tried to run
husky install
. That in turn failed, because it did not find itself in a git repo.This behavior on husky has been a pain point for many people, and they've tried to fix it a bunch of times, though it seems unreliably:
https://github.com/typicode/husky/issues/851
Their current docs provide several options for how to disable husky in various environments: https://typicode.github.io/husky/#/?id=disable-husky-in-cidockerprod
Expected Behavior
We do not attempt to run husky when installing the package as a dependency.
Your Environment