Mac terminal: command not found? - terminal

I'm working on a React app and I went into the terminal to install a package. Suddenly out of nowhere my terminal isn't working and when I type a command in the terminal I get: "npm: command not found".
Can anyone help?
I'm running High Sierra Beta

Related

Brew not working after i close iterm2 on mac

I recently changed from windows to mac air m1 and I have been having problems with the installation of brew.
I followed the steps that are displayed on the website, I ran the two commands after the next steps section and it works, but after I close the terminal it displays:
zsh: command not found: brew
I do the installation process again and it works but I don't want to do it every time I open the terminal(iterm), any solutions?

Installed iterm2, now both vscode and mac internal terminals are not working

I installed iterm2 and oh my zsh on my new macbook pro M1. Now I can not use the internal vscode terminal or mac terminal.
What I have tried:
I have updated my mac, vscode, iterm2, brew, and oh my zsh.
I am using zsh.
I checked my system preferences/users & groups/unlock/advanced options/login shell: /usr/local/bin/zsh. Which seems correct?
In iterm2 I checked echo $SHELL. (see image)
In iterm2 I checked echo $PATH. (see image)
I ran brew doctor. No issues there.
Checked that I had oh my zsh installed and updated.
iterm2-shell/path/brew/ohMyZsh
In vscode I have looked at code/preferences/settings/[typed]terminal
checked terminal>integrated>shell: Osx
checked that json file. I don't know what Im looking for there.
vscode-settings.json
Need Help With:
In vscode the terminal window does not open now and I get a error message.
vscode internal terminal error message
Now that I have iterm2, am I no longer able to use the internal mac terminal? When I go to open the internal mac terminal it is stuck on the following screen.
Internal mac terminal
Any help or guidance would be much appreciated. I am new to the terminal and command line.
Thanks in advance.

Terminal not working in Aptana IDE with OSX

This Terminal Emulator is not functional because no 'bash' shell could be found.
Please correct the problem and restart the ID
This is a brand new OSX laptop with 10.13.6, and I've been trying to replicate the setup with aptana 3. I'm not sure what I'm missing to be getting this error... previous threads with similar errors all seem to be dealing with windows environments
I had the same issue on macOS Mojave 10.14 with AptanaStudio 3.7.2 and could fix it based on the suggestion here (which is for linux) https://stackoverflow.com/a/6685532/5220160
So assuming your AptanaStudio.app sits in /Applications the fix would be chmod +x /Applications/AptanaStudio.app/Contents/Eclipse/plugins/com.aptana.terminal_3.0.0.201802081530/os/macosx/redtty

Nativescript doesn't recognize Xcode (High Sierra)

I'm on High Sierra with Xcode Version 9.0.1 (9A1004).
When running tns doctor I get the following warning:
WARNING: Xcode is not installed or is not configured properly.
You will not be able to build your projects for iOS or run them in the iOS Simulator.
To be able to build for iOS and run apps in the native emulator, verify that you have installed Xcode.
If I run the installation script, furthermore I get:
xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance
Xcode is not installed or not configured properly. Download, install, set it up and run this script again.
As you might have guessed, I have Xcode installed from the app store and I've also installed cocoapods and xcodeproj. This is the only warning that I get.
Any suggestions?
Run the following command:
sudo xcode-select --reset
I found this answer here:
http://overengineer.net/fixing-nativescript-s-xcode-is-not-installed-or-is-not-configured-properly-on-macos
I had this problem today, but running the recommended command didn't help. I found that running the command
$ tns doctor
walked me through a series of prompts and corrected the issue. I did have to restart my terminal after the program completed in order for it to take effect.
Open Xcode than go to Preferences -> Locations -> Command Line Tools after that it'll automatically take a path for the same. The system may ask for sudo password.

Mac terminal returns "xcrun: error: unable to exec Xcode native xcrun (Exec format error)."

Mac OS X V. 10.9.4 2.4 GHz 2 GB RAM
Im trying to use Git through my mac terminal and it keeps returning this error every time I submit a git command: "xcrun: error: unable to exec Xcode native xcrun (Exec format error).".
I already installed git and github in my mac. Im somehow new to programming I i don't really understand whats causing this error. Its getting very frustrating.
The following works for me:
sudo xcode-select --reset
The GUI equivalent of this is to log into the machine, open Xcode, go to preferences, locations, and set the active command line tools version of xcode
I was getting a similar xcrun: error: unable to exec Xcode native xcrun (Not a directory). on my mac which is managed by a central admin. I had to run my command with sudo.

Resources