Xcode not found in the PATH and expo cannot run iOS simulator

0 votes

I messed up my PATH and expo no longer recognises Xcode being installed. I know that it is because of the PATH and I tried most of the suggestions here on Stack and the problem got worse.

Firstly, every time I open a terminal I am prompted with these messages:

Last login: Wed Feb 15 19:25:08 on ttys001
/etc/zshrc:7: command not found: locale
/etc/zshrc_Apple_Terminal:104: command not found: mkdir

When I write which expo I am prompted with /opt/homebrew/bin/expo.

When I write which Xcode I am prompted with xcode not found. :(

When I type echo $PATH I am prompted with all this:

/opt/homebrew/bin:/opt/homebrew/sbin:export HOMEBREW_PREFIX="/opt/homebrew";
export HOMEBREW_CELLAR="/opt/homebrew/Cellar";
export HOMEBREW_REPOSITORY="/opt/homebrew";
export PATH="/opt/homebrew/bin:/opt/homebrew/sbin${PATH+:$PATH}";
export MANPATH="/opt/homebrew/share/man${MANPATH+:$MANPATH}:";
export INFOPATH="/opt/homebrew/share/info:${INFOPATH:-}";

As the initial problem was with (AWS) amplify pull command not being recognised, I followed the steps in this thread to write on the .zprofile so I typed :

2. vim .zprofile
3. Press i, then paste this line
export PATH="$HOME/.amplify/bin:$PATH" 
4. Press Esc and :wq to save this file

Then I changed stuff again following this thread and I understand now how to add export PATH=/opt/homebrew/bin/ but it disappears when I close the terminal.

Also, neither vim nor ls are recognised commands.

Question 1: Is there a way to restore my system variables and PATH to a default?

Question 2: How could I change my path for expo to see the application installed and run the simulator?

Question 3: How do I make it permanent/save it?

I would be forever grateful for any support, because there has been 2 days of frustration now.. :((

Please help!

Feb 16 in AWS by Ashwini
• 3,750 points
65 views

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.

Related Questions In AWS

+7 votes
1 answer

Error: Path not found

try using the following command aws s3 cp ...READ MORE

answered Sep 20, 2018 in AWS by Priyaj
• 58,100 points
522 views
0 votes
0 answers

Unix xxd -r -p command NodeJS equivalent

I'm attempting to convert an encrypted shell ...READ MORE

Jun 9, 2022 in Node-js by Vaani
• 7,020 points
142 views
0 votes
1 answer

Truffle tests not running after truffle init

This was a bug. They've fixed it. ...READ MORE

answered Sep 11, 2018 in Blockchain by Christine
• 15,790 points
1,275 views
0 votes
1 answer
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP