This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-11-17
Channels
- # announcements (1)
- # babashka (6)
- # beginners (5)
- # boot (18)
- # calva (4)
- # clj-kondo (39)
- # cljdoc (1)
- # cljs-dev (1)
- # clojure (24)
- # clojure-italy (5)
- # clojure-spec (5)
- # clojurescript (20)
- # cursive (10)
- # data-science (1)
- # datomic (1)
- # emacs (1)
- # fulcro (1)
- # kaocha (5)
- # rewrite-clj (18)
- # shadow-cljs (11)
- # spacemacs (35)
- # sql (11)
- # vim (13)
Hey guys, I'm new here so please bear with me. I'm creating a boot script with the following content:
#!/usr/bin/boot
(defn -main
[& args]
(println "blah"))
but got this error whenever I try to run it
Boot failed to start:
java.lang.NullPointerException
at boot.main$shebang_QMARK_.invokeStatic(main.clj:114)
at boot.main$shebang_QMARK_.invoke(main.clj:110)
at boot.main$_main.invokeStatic(main.clj:140)
at boot.main$_main.invoke(main.clj:123)
at clojure.lang.Var.invoke(Var.java:394)
at org.projectodd.shimdandy.impl.ClojureRuntimeShimImpl.invoke(ClojureRuntimeShimImpl.java:154)
at org.projectodd.shimdandy.impl.ClojureRuntimeShimImpl.invoke(ClojureRuntimeShimImpl.java:145)
at boot.App.runBoot(App.java:407)
at boot.App.main(App.java:500)
Can someone please tell me what I'm doing wrong with this? Also if I follow the instruction in https://github.com/boot-clj/boot/wiki/Scripts I still have the same issue.I installed Boot via Homebrew, so boot
actually lives in /home/linuxbrew/.linuxbrew/bin/boot
but that should be fine since /usr/bin/env boot
finds the first boot
executable in the PATH
?
fwiw, this worked for me:
#!/usr/local/bin/boot
(defn -main
[& args]
(println "blah"))
I'm really new into this whole thing, and googling that error didn't give me any result at all
Uninstall boot and re-install it. Then make a new empty directory, cd into it, and run boot to see what happens.
I'm guessing that (System/getProperty "boot.app.path")
is null here. https://github.com/boot-clj/boot/blob/master/boot/core/src/boot/main.clj#L113-L114