Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting an Execution error - Can't find flutter on PATH. #175

Closed
VikSin opened this issue Jan 20, 2023 · 4 comments
Closed

Getting an Execution error - Can't find flutter on PATH. #175

VikSin opened this issue Jan 20, 2023 · 4 comments

Comments

@VikSin
Copy link

VikSin commented Jan 20, 2023

Flutter and clojure is installed but still getting this error

[vikash@atom hello]$ clj -M:cljd init
Initializing hello as a flutter project!
Execution error (ExceptionInfo) at cljd.build/exec (build.clj:137).
Can't find flutter on PATH.

Full report at:
/tmp/clojure-1693309324456811654.edn


{:clojure.main/message
"Execution error (ExceptionInfo) at cljd.build/exec (build.clj:137).\nCan't find flutter on PATH.\n",
:clojure.main/triage
{:clojure.error/class clojure.lang.ExceptionInfo,
:clojure.error/line 137,
:clojure.error/cause "Can't find flutter on PATH.",
:clojure.error/symbol cljd.build/exec,
:clojure.error/source "build.clj",
:clojure.error/phase :execution},
:clojure.main/trace
{:via
[{:type clojure.lang.ExceptionInfo,
:message "Can't find flutter on PATH.",
:data
{:bin "flutter",
:path
"/.local/share/Corona/Native/Corona/lin/bin/:/opt/Solar2D:/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin:/home/vikash/.cargo/bin:/home/vikash/.nvm/versions/node/v18.9.0/bin:/.local/share/Corona/Native/Corona/lin/bin/:/opt/Solar2D:/home/vikash/.local/bin:/home/vikash/bin:/usr/share/Modules/bin:/home/vikash/.cargo/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/var/lib/snapd/snap/bin:/home/vikash/.local/share/JetBrains/Toolbox/scripts:/flutter/bin:/home/vikash/.local/share/JetBrains/Toolbox/scripts:/flutter/bin"},
:at [cljd.build$exec invokeStatic "build.clj" 137]}],
:trace
[[cljd.build$exec invokeStatic "build.clj" 137]
[cljd.build$exec doInvoke "build.clj" 110]
[clojure.lang.RestFn applyTo "RestFn.java" 137]
[clojure.core$apply invokeStatic "core.clj" 675]
[clojure.core$apply doInvoke "core.clj" 662]
[clojure.lang.RestFn invoke "RestFn.java" 533]
[cljd.build$init_project invokeStatic "build.clj" 308]
[cljd.build$init_project invoke "build.clj" 294]
[cljd.build$_main invokeStatic "build.clj" 418]
[cljd.build$_main doInvoke "build.clj" 410]
[clojure.lang.RestFn applyTo "RestFn.java" 137]
[clojure.lang.Var applyTo "Var.java" 705]
[clojure.core$apply invokeStatic "core.clj" 667]
[clojure.main$main_opt invokeStatic "main.clj" 514]
[clojure.main$main_opt invoke "main.clj" 510]
[clojure.main$main invokeStatic "main.clj" 664]
[clojure.main$main doInvoke "main.clj" 616]
[clojure.lang.RestFn applyTo "RestFn.java" 137]
[clojure.lang.Var applyTo "Var.java" 705]
[clojure.main main "main.java" 40]],
:cause "Can't find flutter on PATH.",
:data
{:bin "flutter",
:path
"/.local/share/Corona/Native/Corona/lin/bin/:/opt/Solar2D:/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin:/home/vikash/.cargo/bin:/home/vikash/.nvm/versions/node/v18.9.0/bin:/.local/share/Corona/Native/Corona/lin/bin/:/opt/Solar2D:/home/vikash/.local/bin:/home/vikash/bin:/usr/share/Modules/bin:/home/vikash/.cargo/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/var/lib/snapd/snap/bin:/home/vikash/.local/share/JetBrains/Toolbox/scripts:/flutter/bin:/home/vikash/.local/share/JetBrains/Toolbox/scripts:/flutter/bin"}}}

@cgrand
Copy link
Contributor

cgrand commented Jan 20, 2023

Where is your flutter installed? Is it on your $PATH and if yes when (which script) is it set?

@VikSin
Copy link
Author

VikSin commented Jan 20, 2023

Flutter directory is in home directory and path is set .bashrc file


# .bashrc

# Source global definitions
if [ -f /etc/bashrc ]; then
	. /etc/bashrc
fi

# User specific environment
if ! [[ "$PATH" =~ "$HOME/.local/bin:$HOME/bin:" ]]
then
    PATH="$HOME/.local/bin:$HOME/bin:$PATH"
fi
export PATH

# Uncomment the following line if you don't like systemctl's auto-paging feature:
# export SYSTEMD_PAGER=

# User specific aliases and functions
export ANDROID_SDK_ROOT=~/Android/Sdk
export PATH="/opt/Solar2D:$PATH"
export PATH="~/.local/share/Corona/Native/Corona/lin/bin/:$PATH"
export PATH="$PATH:~/flutter/bin"

export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"  # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"  # This loads nvm bash_completion

@cgrand
Copy link
Contributor

cgrand commented Jan 20, 2023

Replace all ~ by $HOME in your path.

@VikSin
Copy link
Author

VikSin commented Jan 20, 2023

Thanks, it worked.

@VikSin VikSin closed this as completed Jan 20, 2023
samhedin added a commit to samhedin/ClojureDart that referenced this issue Dec 26, 2024
Just had the issue when setting up on a new computer. Users also had the issue here: Tensegritics#175
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants