sindresorhus / fkill-cli

Fabulously kill processes. Cross-platform.
MIT License
6.88k stars 159 forks source link

Pathing on OSX #10

Closed ghost closed 7 years ago

ghost commented 7 years ago

Is /usr/local/lib expected to be in the user's path?

~ » npm install -g fkill
/usr/local/lib
└── fkill@4.1.0

~ » which fkill
Daniel15 commented 7 years ago

It should put an executable in /usr/local/bin/, which should be on your path. This is the behaviour on Linux, I don't have a Mac OS computer to test.

ghost commented 7 years ago

Yeah, I don't know if this is an npm thing or not. Indeed, the OSX path looks something like /usr/local/bin /usr/bin /bin /usr/sbin /sbin /opt/X11/bin. I tried yarn and got a similar result:

~ » yarn global add fkill
yarn global v0.21.3
warning No license field
[1/4] 🔍  Resolving packages...
[2/4] 🚚  Fetching packages...
[3/4] 🔗  Linking dependencies...
[4/4] 📃  Building fresh packages...
warning undefined has no binaries
warning No license field
✨  Done in 7.10s.
zcong1993 commented 7 years ago

you should export yarn or npm global bin path to your PATH Variable or shell profile, run yarn global bin can get the path

you can do like the Installation guide says

Path Setup
You will need to set up the PATH environment variable in your terminal to have access to Yarn’s binaries globally.
Add export PATH="$PATH:`yarn global bin`" to your profile (this may be in your .profile, .bashrc, .zshrc, etc.)
ghost commented 7 years ago

Yeah, that was already in my config file

zcong1993 commented 7 years ago

maybe you can try $HOME/.yarn/bin

ghost commented 7 years ago

Still with you there:

# Path to Oh My Fish install.
set -gx OMF_PATH "/Users/user/.local/share/omf"

# Customize Oh My Fish configuration path.
#set -gx OMF_CONFIG "/Users/user/.config/omf"

set -x LC_ALL ja_JP.UTF-8  
set -x LANG ja_JP.UTF-8

set -x GOPATH $HOME
set -x PATH $PATH $GOPATH/bin
set -x PATH $PATH $HOME/.multirust/toolchains/stable/cargo/bin/
set -x PATH $HOME/.yarn/bin $PATH
set -x PATH $PATH (yarn global bin)
yannbertrand commented 7 years ago

I think you installed the wrong package. You need to install fkill-cli to use fkill in a terminal. The fkill package is only the API for this module. fkill-cli is supposed to be installed globally, fkill should be added manually to the projects that need it.

shinnn commented 7 years ago

Yes @yannbertrand is right. Try npm i -g fkill-cli and you'll be able to use fkill comamnd.