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

Husky initialization fails with TypeError in bun environment #1457

Open
1 task done
NazCodeland opened this issue Jun 10, 2024 · 0 comments
Open
1 task done

Husky initialization fails with TypeError in bun environment #1457

NazCodeland opened this issue Jun 10, 2024 · 0 comments

Comments

@NazCodeland
Copy link

NazCodeland commented Jun 10, 2024

Issue Type: Bug

Troubleshoot Checklist:

  • I have checked the Husky Troubleshoot Guide

Context:

  • Terminal: PowerShell 7.4.2
  • Node.js version: v18.19.0
  • Package Manager: bun
  • Husky version: 9.0.11

Description:
When trying to initialize Husky in a new project using bun as the package manager, I encounter a TypeError. The error message suggests that the npm_config_user_agent environment variable is undefined, and the script is trying to call the split method on it.

Steps to Reproduce:

  1. Create a new project directory
  2. Initialize git with git init
  3. Install husky with bun add --dev husky
  4. Try to initialize husky with bunx husky init

Expected Result:
Husky initializes successfully and creates the necessary hooks.

Actual Result:
Initialization fails with the following error:

Additional Context:
This issue occurs even in a fresh project following the steps provided in the Husky Get Started Guide.

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

No branches or pull requests

1 participant