Nix on Vscode terminal - macos

I'am having issue using nix on my Vscode terminal, if I type nix-shell on my terminal everything work just fine but if I try on Vscode terminal it says:
zsh: command not found: nix-shell
I already had this issue before and fix it with adding my PATH in the settings.json file at terminal.integrated.env.osx.
The paths that I add are "terminal.integrated.env.osx": { "PATH" : "/Users/my_name/.nix-profile/bin:/opt/homebrew/bin:/Users/my_name/opt/miniconda3/bin:/Users/my_name/opt/miniconda3/condabin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin", "NIX_PATH" : "/Users/my_name/.nix-defexpr/channels"},
I also don't know why my PATH is so long and if I did something wrong.
Nevertheless adding those line on my settings.json fie fixed the issue for a while but it doesn't work anymore and I don't know why.
I am on a MacBook Air (M1, 2020), macos bigsur 11.2.3
I am using the default Terminal.app application provided by mac.
I tried to put integrated and external on terminal settings in Vscode, neither of them work
Thanks for reading and sorry if my explanation aren't good.

Related

Problem trying to run Flutter on any IDE on macOS

I recently got the idea to try out flutter and found particularly difficult to implement it on my macOS (intel).
I have well updated my path, I could run flutter doctor nicely.
Flutter doctor -v
The problem resides in setting up the IDE, I tried both VScode and IntelliJ IDEA.
And I got the same result both time.
env: bash issue
When trying to create a project, there is no issue recognizing the path as shown on this picture
, the problem is brought up right after, when I click Create. It says that env: bash no such file or directory. What I don't understand is that I have a Zsh Shell, and I changed the setting on my IDE to use the /bin/zsh
But I still get a bash (my old SHELL) problem ?
I get the same problem on VScode.
If anyone has any help or information to provide, I would gladly accept it !
Thanks a lot.

Zprofile not found in Mac OS Terminal

I have a new mac that I have been setting up with homebrew, git, node, vs code etc. I noticed that some applications were somehow being installed on bash terminal instead of zsh terminal. Even though I was able to fix that, I now have an error message of
/Users/*****/.zprofile:1: = not found
I tried to create a z profile using
touch ~/.zprofile
How can I fix this error message?

macOS Terminal Process completed on any click

My macOS terminal is showing Process completed when I type any thing. I am not able to type or do anything on terminal (This effect my Android Studio and VsCode terminal also they just open close in an second) So all issue are causing with this terminal I try every thing restore profile etc nothing is working for me.
But one thing is strange here when I restart my Mac terminal works fine but after I work on android studio or vscode with Mac terminal (Not there default terminal because they are not working) After 1 hour same happen as I say before and as in screenshot.
On different questions solutions was to type /bin/bash -x on terminal but I can't even type single character on this.
I am finding solution for this from 1 week and not able to find any thing I need to restart me laptop every 1 hour to work.
I am using BigSur with M1 processor.
Also it was working fine before but I work on Flutter so I have set path and run commands like
Run: nano ~/.zshrc
Add: export PATH=[PATH_TO_FLUTTER_GIT_DIRECTORY]/flutter/bin:$PATH
Run: source ~/.zshrc
And some bash commands to set path.

After updating my Mac OS to Catalina, Flutter is not working anymore in Android Studio. I deleted and re-installed, but still not working

Please Please help. After updating the OS to Catalina, Android Studio would still open, but none of my Flutter apps will work and the emulators do not open (they say 'Loading')
I unistalled Flutter and re-installed it, but in the Terminal when I type in flutter doctor -v, it says "zsh: command not found: flutter"
Is this because I'm no longer using bin (or bash), and now using zsh?
Can someone tell me what I can do to solve this issue? Im not very good at entering Terminal commands, so what exactly would I type to fix this issue? (I'm a beginner)
When I was entering vim bash_profile in the Terminal, I entered the following as the Export Path:
export PATH="$PATH:/Users/raymondfontaine/Developer/flutter/bin"
I had the same problem and it occurred after switching from bash to zsh. A far as I know, you have three different options.
Switch your Terminal back from zsh to bash by typing chsh -s /bin/bash and restart your Terminal. Note: You can always switch back to zsh by typing chsh -s /bin/zsh and restarting your Terminal.
You can tell zsh to use the paths specified in your bash_profile file by typing source ~/.bash_profile into your Terminal. Note: You have to do this every time you open a new Terminal.
The two options above are probably not "Best Practice". The best solution would be to set environment variables for zsh as suggested by the flutter Tutorial: Update your Path.
In your case you have to type nano $HOME/.zshrc into your Terminal enter export PATH="$PATH:/Users/raymondfontaine/Developer/flutter/bin" there, save the file and restart the Terminal. After that flutter doctor -v should run as usual.
Also the emulators in Android Studio should load again. But if you still cannot start them via the Dropdown, try opening them via Tools > AVD Manager. This worked for me while they were not visible in the Dropdown Menu.

OS X 11.4 Xcode 7.3 Swift REPL Error

I'm new to Swift and I using Swift REPL to do some code.
And hers's the error.
But at the end of this long error log it comes :"Welcome to Apple Swift version 2.2 (swiftlang-703.0.18.1 clang-703.0.29). Type :help for assistance."
Is there something wrong and how can I fix this?
Thanks!
tl;dr - Check your PATH environment variable.
I had this same issue and was able to get through it. In my case I had MAMP PRO installed and was using a modified PATH for it. That turned out to be problematic for using the swift REPL.
I use Zsh as my default terminal shell, so in my ~/.zshrc file (~/.bashrc is the equivalent for Bash) I had changed
export PATH="/Applications/MAMP/bin/php/php5.5.3/bin:$PATH"
export PATH="/Applications/MAMP/Library/bin:$PATH"
to
export PATH="$PATH:/Applications/MAMP/bin/php/php5.5.3/bin"
export PATH="$PATH:/Applications/MAMP/Library/bin"
and restarted my terminal session. The swift REPL was now starting up properly again.
I had not checked thoroughly if this adjustment adversely affected my MAMP PRO setup but a quick check suggested that this change was fine.
That happened to me too. Not really know about ur problem but I solved mine by reinstalling the newest version of Xcode. That happened mostly because you did not update the new version of Mac which is required to run the newest Xcode which caused the terminal repl problem because the Xcode can not be run at the first place.

Resources