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

[BUG] process.env.npm_config_user_agent missing in v7 #2960

Closed
alexander-mai opened this issue Mar 25, 2021 · 1 comment · Fixed by #2964
Closed

[BUG] process.env.npm_config_user_agent missing in v7 #2960

alexander-mai opened this issue Mar 25, 2021 · 1 comment · Fixed by #2964
Assignees
Labels
Bug thing that needs fixing Release 7.x work is associated with a specific npm 7 release

Comments

@alexander-mai
Copy link

Current Behavior:

npm i --save-dev husky doesn't run the install and postinstall scripts after installing the package so the git hooks are never setup.
The reason is the missing environt variable npm_config_user_agent

Expected Behavior:

The env var npm_config_user_agent is set.
The variable is set on npm version 7.6.3.

Steps To Reproduce:

npm i --save-dev husky
See the error message

husky > Setting up git hooks
Cannot destructure property `name` of 'undefined' or 'null'.
husky > Failed to install

Environment:

  • OS: MacOS 11.2.3
  • Node: 10.24.0
  • npm: v7.7.2
@alexander-mai alexander-mai added Bug thing that needs fixing Needs Triage needs review for next steps Release 7.x work is associated with a specific npm 7 release labels Mar 25, 2021
@jspivack
Copy link

Also seeing this in 7.7.4 when trying to run a script with run-script-os

@alexander-mai alexander-mai changed the title [BUG] process.env.npm_config_user_agent missing in v7[BUG] <title> [BUG] process.env.npm_config_user_agent missing in v7 Mar 25, 2021
@wraithgar wraithgar self-assigned this Mar 25, 2021
@wraithgar wraithgar removed the Needs Triage needs review for next steps label Mar 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug thing that needs fixing Release 7.x work is associated with a specific npm 7 release
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants