Skip to content
This repository has been archived by the owner on Sep 1, 2022. It is now read-only.

PATH is not updated for globally installed packages #126

Closed
umar-ahmed opened this issue Jul 28, 2018 · 2 comments
Closed

PATH is not updated for globally installed packages #126

umar-ahmed opened this issue Jul 28, 2018 · 2 comments
Labels
bug Something isn't working high priority Drop all else and review this

Comments

@umar-ahmed
Copy link
Contributor

Describe the bug
On a machine that never had Yarn installed, the install script for YVM does not set up the PATH correctly for global installed packages. The Yarn website says:

Path Setup

Unix/Linux/macOS

If you chose manual installation, the following steps will add Yarn to path variable and run it from anywhere.

Note: your profile may be in your .profile, .bash_profile, .bashrc, .zshrc, etc.

  1. Add this to your profile: export PATH="$PATH:/opt/yarn-[version]/bin" (the path may vary depending on where you extracted Yarn to)
  2. In the terminal, log in and log out for the changes to take effect

To have access to Yarn’s executables globally, you will need to set up the PATH environment variable in your terminal. To do this, add export PATH="$PATH:yarn global bin" to your profile.

https://yarnpkg.com/en/docs/install#alternatives-stable

To Reproduce
Steps to reproduce the behavior:

  1. Completely remove Yarn and YVM from your machine (remember to edit your PATH!!!)
  2. Run curl -fsSL https://raw.githubusercontent.com/tophatmonocle/yvm/master/scripts/install.sh | bash
  3. Run source yvm
  4. Run yvm install 1.7.0
  5. Run yvm use 1.7.0
  6. Run yarn global add serve
  7. Run which serve

Expected behavior
It should print out a path to the executable in the ~/.yarn/bin/ directory.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: Ubuntu
  • YVM Release: Fri, 27 Jul 2018 15:09:28 GMT

Additional context
Add any other context about the problem here.

@jakebolam jakebolam added bug Something isn't working high priority Drop all else and review this labels Aug 1, 2018
@jakebolam
Copy link
Contributor

@umar-ahmed do we think this is still a problem with the changes we made to path in JS?
@francoiscampbell do you know?

@jakebolam
Copy link
Contributor

I think this is fixed with global yarn version

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working high priority Drop all else and review this
Projects
None yet
Development

No branches or pull requests

2 participants