-bash: expo: command not found - bash

I've seen other posts with this issue (cf : "exp: command not found" How do I add expo cli to path?)
But still i cannot resolve this issue...
here is a screenshot of my config.
Please someone have a solution? of maybe i did bad ?
Thanks a lot :)

Seems you are using ZSH, in this case you need to configure your path in ~/.zshrc file and not in the .bash_profile that only will be load by bash
echo 'export PATH=$PATH:$HOME/.npm-global/bin' >> ~/.zshrc and then reload the config with source .zshrc.

Related

zsh: command not found: mv (I'm trying to move composer.phar)

I'm trying to follow a course on Udemy (laravel). I just downloaded XAMPP (I'm on macOS Monterey) and I edited the ~/.zshrc file and added export PATH=/Applications/XAMPP/bin
After that I installed composer which worked successfully, but now when I try to run this command: mv composer.phar /usr/local/bin/composer the shell responds with: zsh: command not found: mv.
Does anyone know how to fix this?
You messed up your PATH. Do a
path+=(/Applications/XAMPP/bin)
instead of the export PATH=... you are using now. And since you want to fiddle with the PATH in your .zshrc, I also suggest to do a
typeset -aU path
near the top of your .zshrc to avoid duplicate PATH entries when you launch an interactive subshell.
The file mv was not found in your PATH, is your PATH variable setup correctly?
Enter echo $PATH to see your PATH variable.
Try /bin/mv to see if the binary file exists.

How to fix the terminal "source" command on OSX Catalina

I try executing the below commands in my terminal.
$ source ~/.bash_profile or . ~/.bash_profile
and the system returns:
-bash: [[-s: command not found
I cannot think of anything extra information to provide.
I kept researching my issue and came across this stackoverflow post
I initially misunderstood the error message to mean the source command was not found. After reading the other post I tried running bash .bash_profile and the result was .bash_profile: line 11: [[-s: command not found. I had an error in my .bash_profile file. I commented out the line and tried running source .bash_profile and it worked.
The initial command not found did not relate to the source command, it related to the file I was running with source.
I hope this helps someone else.

Command that is not found in Mac os Terminal

I am trying to install mySQL on macOS Mojave. I have installed mySQL Community Server 8.0.17 and then attempted to configure the command line to recognize mySQL commands by using the following code in Terminal:
echo ‘export PATH=/usr/local/mysql/bin:$PATH’ >> ~/.bash_profile
Followed by:
.~/.bash_profile
After entering this last line of code, I get the following message:
-bash: ‘export: command not found
Can anyone help me to troubleshoot this problem. I'm new to coding, so I'm not sure how to rectify this error. Thank you for your help.
The problem is in:
echo ‘.......’ >> ~/.bash_profile
in your quotes. Seems you are using TextEdit app or Notes app which by default translate normal quotes
'
into
’
So this will work for you:
echo 'export PATH=/usr/local/mysql/bin:$PATH' >> ~/.bash_profile

Adding spark-installer to path with zsh

I'm using zsh with oh-my-zsh as my shell and I need to add the Laravel Spark Installer to my path, but I must be missing a step or messing up the syntax
I've added spark-installer to my path like this:
path+=('/Users/retrograde/Development/spark-installer')
Nothing was added to the path, so I edited it directly with:
vim ~/.zshrc
added
# Spark installer
export PATH="$HOME/Users/retrograde/Development/spark-installer:$PATH"
then ran:
source ~/.zshrc
The spark-installer does not show with the other paths upon running echo "$PATH"
Am I missing something? Maybe my syntax is wrong? TIA

-bash: sudo: command not found Mac OS X (EC2 CLI prob?)

Getting the error:
-bash: sudo: command not found
echo $PATH outputs PATH:EC2_HOME/bin
I'm running Mac OSX 10.8.3
That seems wrong even for a n00b like me.
How do I fix my $PATH and return my computer to it's former self?
As stated in the comments the right files to set up your $PATH variable are: ~/.profile or ~/.bash_profile
export PATH=/usr/bin:/usr/sbin:/bin:/usr/local/bin:/sbin:/opt/x11/bin:$PATH
In this way when you re-enter in the console your PATH will work fine.
You can add other directories to your $PATH as you like.
If you just copy and past that line in an active console you just set the PATH variable temporary, when you logout and login again you will loose your path, so add it in your ~/.bashrc file.
I'm not sure how you've managed to get into that state, though this article explains how you can set your path.
If it helps, the output from my echo $PATH is: -
/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/opt/X11/bin
go to shell
choose new command
put this : sudo vim .bash_profile
then put : export PATH=/usr/bin:/usr/sbin:/bin:/usr/local/bin:/sbin:/opt/x11/bin:$PATH
This worked for me:
echo $PATH
Followed by:
export PATH="/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"

Resources