-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
yarn doesn't add global packages bin/ to $PATH #5353
Comments
Reproduced. Installing the .msi set it up for the first user correctly; however the path entry wasn't made by yarn for the next user. |
@jhudsoncedaron: This also seems to be an issue when using yarn on |
same, both local and on google cloud machine. It's lame. (both debian stretch 9) |
I wonder if this is not part of a bigger problem - when I have something, e.g. node-sass installed globally with |
if you use (install) yarn from npm you must add |
@HKhademian: Yes, but this should be actually added by the installer automatically. |
The install directory is not added to the PATH automatically, so it would be nice to let the users know, they have to change that to be able to use the globally installed packages. See: yarnpkg/yarn#5353
The install directory is not added to the PATH automatically, so it would be nice to let the users know, they have to change that to be able to use the globally installed packages. See: yarnpkg/yarn#5353
For anyone else who's having the same issue, I solved it by running |
I've had some issues on Ubuntu 18.10 by using @HKhademian solution: When the internet is down I couldn't log into my account, because
And for some reason this is caught as an error in the profile script and blocks you from logging in. Solution is to do as suggested
|
Hi Everyone, Yarn won't install in its specified Global directory, nor does zsh pick up the command for the installed global package. I'm usingNVM and Yarn installed with
However when I yarn I'm wanting all global yarn installs to go to The only WORKAROUND for me at the moment is running the global command from bash and not zsh. Below is my .zshrc file:
|
Should be export PATH="$PATH:$(yarn global bin)" instead of export PATH="$(yarn global bin):$PATH" |
@nimaiwalsh it's because you misused yarn cli.
In order to install the package globally with yarn just use: |
For my, because it didn't add it to my path,
|
Just a reminder that if you're using |
for fish shell (<3.2.0), run this command once (ref): set -U fish_user_paths (yarn global bin) $fish_user_paths |
if you are using oh-my-zsh and nvm, be sure you add nvm as a plugin in ~/.zshrc |
How to fix this issue in mac? Error: ENOTDIR: not a directory, open '/Users/shubhangishukla/.config/yarn'
|
@meatnordrink I am facing similar issue while running yarn or yarn install from terminal Error: ENOTDIR: not a directory, open '/Users/shubhangishukla/.config/yarn' Still not resolved . |
@shubhangicatch , did the steps I described not address the issue? (Did you try adding that path to the |
What is the current behavior?
yarn
doesn't add the directory for commands of globally installed packages (~/.yarn/bin
) to$PATH
,hence these commands cannot be invoked after having them added using
yarn
.What is the expected behavior?
PATH
is updated to include~/.yarn/bin
by yarn during initial installation or during global package installation so commands can be invoked without requiring extra changes to config/.bashrc
.Please mention your node.js, yarn and operating system version.
node v9.2.0
yarn 1.3.2
WSL (Bash on Windows)
The text was updated successfully, but these errors were encountered: