DEV Community

Discussion on: Using husky's pre-commit hook with a GUI

Collapse
 
mathieug profile image
Mathieu Ghennassia

Thanks for the tips.

I now have another error:

yarn run v1.22.17
error An unexpected error occurred: "Failed to replace env in config: ${NPM_TOKEN}".
info If you think this is a bug, please open a bug report with the information provided in "[...]/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
husky - pre-commit hook exited with code 1 (error)
Enter fullscreen mode Exit fullscreen mode

Here's my ~/.huskyrc:

PATH="/usr/local/bin:$PATH"

export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
Enter fullscreen mode Exit fullscreen mode