Welcome! Please see the About page for a little more info on how this works.

0 votes
in Compiler by

Hi guys I,m basically trying to run a clojure script app using a shadow file, to be honest i don't really know too much about clojure since this is a project that i downloaded, but i need it to make it run locally on windows 11 and i'm receiving the following error

shadow-cljs - config: C:\Appsmiths\i\src\winglue\webglue\shadow-cljs.edn
===== ERROR =================

Executable 'java' not found on system path.

I have java on my system of course and my environment variables are well configured, so i think it could be something inside of the shadow file, but i cannot identify what it is, if you can help me out with this it would be really helpful

this is basically all the shadow config:

;; shadow-cljs configuration
{:dependencies [
                [akiroz.re-frame/storage "0.1.3"]
                [bidi "2.1.5"]
                [com.cemerick/url "0.1.1"]
                [binaryage/devtools "1.0.2"]
                [binaryage/oops "0.7.1"]
                [com.cognitect/transit-cljs "0.8.256"]
                [com.rpl/specter "1.1.3"]
                [com.taoensso/timbre "4.10.0"]
                [cljs-http "0.1.46"]
                [day8.re-frame/async-flow-fx "0.1.0"]
                [day8.re-frame/http-fx "0.1.6"]
                [day8.re-frame/re-frame-10x "1.5.0"]
                [day8.re-frame/tracing "0.5.1"]
                [day8.re-frame/undo "0.3.2"]
                [district0x/graphql-query "1.0.6"]
                [district0x/re-frame-interval-fx "1.0.2"]
                [expound "0.8.5"]
                [funcool/cuerdas "2021.05.29-0"]
                [funcool/promesa "2.0.1"]
                [juji/editscript "0.4.6"]
                [maximgb/re-state "1.5.0"]
                [medley "1.2.0"]
                [metosin/spec-tools "0.10.4"]
                [org.clojure/data.json "0.2.6"]
                [org.clojure/spec.alpha "0.2.187"]
                [pez/clerk "1.0.0"]
                [prismatic/schema "1.1.12"]
                [re-frame "1.3.0"]
                [re-graph "0.1.15" :exclusions [cljs-http]]
                [com.andrewmcveigh/cljs-time "0.5.2"]
                [reagent "1.1.1"]
                [spyscope "0.1.6"]
                [venantius/accountant "0.2.5"]
                [lambdaisland/regal "0.0.143"]
                [cheshire "5.11.0"]
                [camel-snake-kebab "0.4.3"]
                [garden/garden-units "1.0.0-RC2"]
                [cljs-bean "1.8.0"]]

 :source-paths ["lib" "graphql" "src" "C:/Appsmiths/i/src/winglue-artifact/webglue" "test"]
 :nrepl {:port 41002}
 :open-file-command ["idea " :pwd " --line " :line :file]
 ;; webglue artifact are in /i/src/winglue-artifact/webglue/js
 :builds {:app {:output-dir "C:/Appsmiths/i/src/winglue-artifact/webglue/js"
                :asset-path "/js"
                :compiler-options
                {:optimizations :none
                 ;; use es2018 for recat-markdown-editor
                 :output-feature-set :es2018
                 :main webglue.core
                 :closure-warnings {:global-this :off}
                 :closure-defines {re-frame.trace/trace-enabled? true
                                   day8.re-frame-10x.debug?             true
                                   day8.re-frame.tracing.trace-enabled? true}
                 :external-config {:devtools/config {:features-to-install    [:formatters :hints]
                                                     :fn-symbol              "Fn"
                                                     :print-config-overrides true}}}
                :target :browser
                :js-options {:ignore-asset-requires true}
                :module-loader true
                :modules {:webglue
                          {:entries [webglue.core]}
                          :ag-grid
                          {:entries [webglue.components.ag-grid]
                           :depends-on #{:webglue}}
                          :dev
                          {:entries [webglue.pages.component-show-case webglue.pages.dev]
                           :depends-on #{:webglue}}
                          :plot
                          {:entries [webglue.component-generator.graph
                                     webglue.component-generator.ivsp-plot
                                     webglue.component-generator.pie-chart
                                     webglue.component-generator.bar-chart
                                     webglue.component-generator.bubble-chart]
                           :depends-on #{:webglue}}}
                :devtools {:repl-pprint true
                           :after-load webglue.core/reload!
                           :loader-mode :eval
                           :http-root "C:/Appsmiths/i/src/winglue-artifact/webglue"
                           :http-port 3333
                           :http-handler shadow.http.push-state/handle
                           :preloads [devtools.preload
                                      ; use only for debug re-frame, this option wil take 300 ms to reload and 330 file to watch
                                      ; run by uncomment next line, and save. shadow-cljs will do the rest
                                      day8.re-frame-10x.preload]}}
          :win-app {:output-dir "C:/Appsmiths/i/src/winglue-artifact/webglue"
                    :asset-path "/js"
                    :compiler-options
                    {:optimizations :none
                     :output-feature-set :es2018
                     :main webglue.core
                     :closure-warnings {:global-this :off}
                     :closure-defines {re-frame.trace/trace-enabled? true
                                       day8.re-frame-10x.debug?             true
                                       day8.re-frame.tracing.trace-enabled? true}
                     :external-config {:devtools/config {:features-to-install    [:formatters :hints]
                                                         :fn-symbol              "Fn"
                                                         :print-config-overrides true}}}
                    :target :browser
                    :js-options {:ignore-asset-requires true}
                    :modules {:webglue {:entries [webglue.core]}}
                    :devtools {:http-port 3434
                               :http-root "C:/Appsmiths/i/src/winglue-artifact/webglue"
                               :http-handler shadow.http.push-state/handle
                               :after-load webglue.core/reload!
                               :loader-mode :eval
                               :preloads [devtools.preload
                                          day8.re-frame-10x.preload]}}
          :test {:target :browser-test
                 :test-dir "test-assets"
                 :devtools {:http-port 9100
                            :http-root "test-assets"}
                 :runner-ns main-test-initial
                 :js-options {:ignore-asset-requires true}
                 :ns-regexp "-test$"}

          :app-release {:target :browser
                        :modules {:webglue
                                  {:entries [webglue.core]}}
                        :js-options {:ignore-asset-requires true}
                        :compiler-options {:source-map false
                                           :output-feature-set :es2018
                                           :main  webglue.core
                                           :closure-defines {}}
                        :release  {:output-dir "C:/Appsmiths/i/src/winglue-artifact/webglue/js"}}

          :tao2py-release {:target :browser
                           :js-options {:ignore-asset-requires true}
                           :compiler-options
                           {:source-map false
                            :output-feature-set :es2018
                            :main  webglue.core
                            :closure-defines {webglue.config/tao2py-release true
                                              ;; landing page is page key in webglue.route_pages
                                              webglue.config/landing-page "field-overview"}}
                           :release  {:output-dir "C:/Appsmiths/i/src/winglue-artifact/webglue/js"
                                      :asset-path "/js"}
                           :module-loader true
                           :modules {:webglue
                                     {:entries [webglue.core]}
                                     :ag-grid
                                     {:entries [webglue.components.ag-grid]
                                      :depends-on #{:webglue}}
                                     :dev
                                     {:entries [webglue.pages.component-show-case webglue.pages.dev]
                                      :depends-on #{:webglue}}
                                     :plot
                                     {:entries [webglue.component-generator.graph
                                                webglue.component-generator.ivsp-plot
                                                webglue.component-generator.pie-chart
                                                webglue.component-generator.bar-chart
                                                webglue.component-generator.bubble-chart]
                                      :depends-on #{:webglue}}}}

          :tao2py-testing {:target :browser
                           :modules {:webglue
                                     {:entries [webglue.core]}}
                           :js-options {:ignore-asset-requires true}
                           :compiler-options {:source-map false
                                              :output-feature-set :es2018
                                              :main  webglue.core
                                              :closure-defines {}}
                           :release  {:output-dir "C:/Appsmiths/i/src/winglue-artifact/webglue/js"}}

          :budger-release {:target :browser
                           :modules {:webglue {:entries [webglue.core]}}
                           :release {:output-dir "release/js"}
                           :js-options {:ignore-asset-requires true}
                           :compiler-options {:source-map false
                                              :output-feature-set :es2018
                                              :main       webglue.core
                                              :closure-defines {}}}}}
by
What happens if you open a command prompt and type "java --version" (without the quotes)?
by
i get

java 21.0.1 2023-10-17 LTS
Java(TM) SE Runtime Environment (build 21.0.1+12-LTS-29)
Java HotSpot(TM) 64-Bit Server VM (build 21.0.1+12-LTS-29, mixed mode, sharing)
by
Ok, that seems promising. And what command are you actually running?
by
we run the app using two commands, one of them is for windows

"win:start": "npm run win:buildcss && npm run win:watch", (on package.json)

but i get the error so i decided to run

 npx shadow-cljs compile app

and i get the same error
by
Very interesting - those are helpful details. I'm not exactly sure how the java executable is located on windows by npx - Either $PATH or $JAVA_HOME or something else... I know one common mistake with PATH on windows is setting it for the current user only (instead of system wide), maybe it's something like that?

Do any shadow projects work? Maybe try a more trivial one.
by
The thing is that the variable is set on the system, not for the current user, i will have to check if any other cljs project run because all seems pretty much configured
by
you got it - gl

Please log in or register to answer this question.

...