Skip to content

Error with nvm on Mac #223

Open
Open
@krokicki

Description

@krokicki

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.

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions