简体   繁体   中英

PATH prismic command not found in my bash

I am getting this :

-bash: prismic: command not found

and when i tried to see and fix it i got this below PATH. I want to change it but every time i do nothing change.

echo $PATH

/Users/myname/.rvm/gems/ruby-2.3.3/bin:/Users/myname/.rvm/gems/ruby-2.3.3@global/bin:/Users/myname/.rvm/rubies/ruby-2.3.3/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/myname/.rvm/bin

I tried to use export using these commands :

export PATH="/usr/bin:/bin:/usr/sbin:/sbin"
export PATH="/usr/local/bin:/usr/local/sbin:$PATH"

But nothing change. I am tying install Prismic using this command:

npm install -g prismic-cli

it work then i try to use this command :

prismic init whatevername

I get this error every time

-bash: prismic: command not found

Clearly the binary for prismic is not in your path.

First find out where it is:

sudo updatedb
locate prismic

Then add that directory to your PATH.

As @Bruno9779 says the binary has not been found in any directory on your PATH. What you need to do is find the residing directory of the "primsic" binary and add it to your PATH. To find the binary you can use any search tool. Bruno mentions locate but you could also use find:

find / -type f -name "prismic"

Once you have found the directory containing the "prismic" file you need to add it to your PATH using the export command:

export PATH=/some/directory/bin:$PATH

where you obviously substitute "/some/directory/bin" with the path to the directory containing the "prismic" file.

EDIT 15:01 GMT 30/01/2017:

Prismic installs it's binaries into the 'node_modules/.bin' directory therefore Hesham was adding the wrong directory to his path and hence the command was not being found.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM