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:
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
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.. :((