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

Error with nvm on Mac #223

Open
krokicki opened this issue Feb 10, 2023 · 2 comments
Open

Error with nvm on Mac #223

krokicki opened this issue Feb 10, 2023 · 2 comments
Assignees
Labels

Comments

@krokicki
Copy link

Platform

  • Operating system and version? macOS Catalina
  • Shell and version? GNU bash, version 3.2.57(1)-release (x86_64-apple-darwin19)
  • autoenv installation method: automated (with cURL), it used Brew
  • autoenv version: 0.3.0

Describe the bug

My .env file:

nvm use v16.14.2

The command works when executed manually. When it's executed by autoenv it throws this error and unsets the node environment entirely:

nvm is not compatible with the "NVM_NPM_CONFIG_PREFIX_ENV" environment variable: currently set to "NVM_NPM_CONFIG_PREFIX_ENV"
Run `unset NVM_NPM_CONFIG_PREFIX_ENV` to unset it.

Expected behavior

Expected to work the same way as manually invoking the command.

Additional context

I've no idea if this is an autoenv bug or nvm bug. Autoenv must be using a different environment compared to the shell, but I couldn't puzzle out what's different. I don't have any NVM or NPM variables set anywhere, or anything special configured.

@krokicki
Copy link
Author

I should add that I tried nvm's advice to run unset NVM_NPM_CONFIG_PREFIX_ENV and it didn't help. I also tried changing the .env file to clear it from the environment that nvm runs in:

NVM_NPM_CONFIG_PREFIX_ENV='' nvm use v16.14.2

@hyperupcall
Copy link
Owner

hyperupcall commented Feb 15, 2023

Thank you for reporting! It seems there are multiple issues with NVM (issue #194).

I will take another stab at these issues in the coming days, and I'll see what i can find.

@hyperupcall hyperupcall self-assigned this Apr 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants