Problem trying to run Flutter on any IDE on macOS - bash

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.

Related

Unable to run a dart program inside VS code

I am new to Dart/flutter. I have installed flutter SDK and VS Code on windows 10 machine, updated the system path, run flutter doctor, which shows that flutter is indeed installed (flutter doctor output). I read that installing flutter is enough, and I don't have to install Dart SDK too, as it comes build in with flutter (please correct me if I am wrong).
I wrote a very short Dart code for testing, but I couldn't run it from VS Code terminal (run in terminal output), as it returns the following error: "bash: dart: command not found".
But when I debug the code in VS Code, it returns the expected output (debug output).
Can someone please explain to me if I am doing something wrong, or if I am missing something? Why can't I run the program from the bash terminal?
Thanks
You should enter the full path directory instead of file name. For doing so right click on the dart file then choose Copy Path.
Then run following code on terminal:
dart (paste main file path)
For more information about creating and running Dart console application using VSCode please check out THIS answer.

VSCode - Maven.archetype.generate fails

I get the below error message when I try to run the command in VSCode.
Command "maven.archetype.generate" fails. Cannot read property 'length' of undefined
As far as I can see, I have all plugins/extensions but cannot work out why it won't work. I found this but still cannot get it to work, however I can run apps for files created before I updated VSCode to version 1.32.1. I just cannot create new ones.
It's look like a bug.
Are you running the commands without any workspace or folder open?
Open a folder first, see if the issue still exists. If it's gone, I
suppose it's because of a potential NPE which is fixed by PR #276 but
not released yet. Please let me know the result.
It worked for me!
See more: https://github.com/Microsoft/vscode-maven/issues/277#issuecomment-473166245
From command line, type in:
mvn --version
to see if Maven is installed properly.
You need maven and jdk installed for maven to work.
Check out the “Before you begin” here:
https://code.visualstudio.com/docs/java/java-tutorial#_create-the-program
What is probably happening is that you do not have Maven or JDK installed, or you have not set the system variables properly. These installations are not the same as the plugins/extensions found in Visual Studio Code. These are in addition to that.

XCode performs custom behavior .sh script failed with The operation couldn’t be completed,Exec format error

As you can see near the screenshot Logs infos pic, the .sh Script can run normal inside terminal, but failed to run via Xcode custom behavior, Is there missing some configuration? I've Googled a lot of infos. still can't solve it. I really need someone's help. Thanks
XCode version: Version 8.3.2 (8E2002)
Add a New Run Script Phase in your projects Build Phases to run a Shell script. You do not need to open -a Terminal:
Update:
How I understand your comment, your actual question is how to get the Xcode project directory. Xcode provides a enviromental variable for this, ${PROJECT_DIR}:
prints:
You can find a list of Xcodes enviromental variables in this repo and helpful information in Apples documentation.

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.

Sencha Touch Cmd tool 3.0 install not working on Mac

-bash: sencha: command not found
I just spent a few hours trying to make this Sencha Cmd works on my MacBook, but just couldn't. I uninstalled a previous version and just couldn't get it to work again. I always get the
-bash: sencha: command not found
error. I did try everything in this post, without success.... I even get an error when I call
.bash_profile
stating that it's not found... Do you have any idea what could be the problem ?
I'm fairly new to the Linux command world so I might miss a point here. Maybe I might use "sudo" to be granted acces to bask_profile ?
EDIT : I got it working for the current bash session. I position myself at the user root (~/) and call ". .bash_profile"(the space is important here). BUT... it only works for the current session. As soon as I close Terminal and reopen it, I loose everything :-(
OK, just so you know, I managed to fix the damn thing be opening and editing the ".bash_profile" file in a text editor (TextMate for me). This is an hidden file, but you can configure your Mac to show those files in Finder. The file is located at your user's root. It is quite annoying to have to spend hour messing in path and environment variables in 2013... Installer should do those things and reports error if something happens in the install process.

Resources