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

nvm is not compatible with the "PREFIX" environment variable #5202

Open
peterharding opened this issue Jan 9, 2018 · 5 comments
Open

nvm is not compatible with the "PREFIX" environment variable #5202

peterharding opened this issue Jan 9, 2018 · 5 comments
Assignees
Labels

Comments

@peterharding
Copy link

Do you want to request a feature or report a bug?
Bug

What is the current behavior?
When executing a shell script from package.json scripts that uses nvm, this error is shown:

nvm is not compatible with the "PREFIX" environment variable: currently set to "/usr/local"
Run `unset PREFIX` to unset it.

If the current behavior is a bug, please provide the steps to reproduce.
Minimal repository: https://github.com/peterharding/yarn_prefix_bug

screen shot 2018-01-09 at 11 35 37 am

What is the expected behavior?
yarn run <command> behaves the same as npm run <command> and does not produce an error.

Please mention your node.js, yarn and operating system version.
Versions used:
nvm 0.33.4
node v8.9.1
yarn 1.3.2
OSX 10.11.6

@ghost ghost assigned arcanis Jan 9, 2018
@ghost ghost added the triaged label Jan 9, 2018
@arcanis
Copy link
Member

arcanis commented Jan 11, 2018

We don't change the value of the PREFIX afaik. Have you checked if you have it in your environment?

@peterharding
Copy link
Author

screen shot 2018-01-11 at 9 33 00 am

https://github.com/peterharding/yarn_prefix_bug
updated with log files that have full env outputs

@peterharding
Copy link
Author

https://github.com/yarnpkg/yarn/blob/master/src/registries/npm-registry.js#L46
possible culprit

@yyjazsf
Copy link

yyjazsf commented Mar 7, 2018

when I use yarn 1.3.x ,vscode integrated terminal usually report it. but my iTerm2 is ok. now,I use yarn 1.5.1. all terminal are work well,you can try to update yarn

@rp01
Copy link

rp01 commented Nov 13, 2018

just force closing the terminal and reopening worked for me.

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

4 participants