This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-01-22
Channels
- # asami (31)
- # babashka (1)
- # beginners (29)
- # biff (32)
- # cider (6)
- # clojure (29)
- # clojure-europe (7)
- # clojurescript (16)
- # community-development (18)
- # core-typed (11)
- # emacs (8)
- # hyperfiddle (10)
- # lsp (26)
- # nbb (8)
- # off-topic (17)
- # other-languages (1)
- # pedestal (2)
- # reitit (6)
- # releases (1)
- # sci (2)
- # shadow-cljs (19)
Hello, a newbie here. Trying to set up Biff. I keep getting this error.
----- Error --------------------------------------------------------------------
Type: java.lang.IllegalArgumentException
Message: No matching method exit found taking 2 args
Location: <expr>:73:5
----- Context ------------------------------------------------------------------
69: (System/exit 1 exit-code)))
70:
71: (defn -main [& [branch]]
72: (when-not (have-java-11?)
73: (die "Please install Java 11 or higher."))
^--- No matching method exit found taking 2 args
74: (when-not (fs/which "curl")
75: (die "`curl` command not found. Please install it. (`scoop install curl` on Windows.)"))
76: (let [ref->commit (fetch-refs)
77: commit (if-not branch
78: (ref->commit "HEAD")
----- Stack trace --------------------------------------------------------------
com.biffweb.new-project/die - <expr>:66:1
com.biffweb.new-project - <expr>:73:5
clojure.core/apply - <built-in>
com.biffweb.new-project - <expr>:138:1
This is my java version
$ java -version
openjdk version "19.0.1" 2022-10-18
OpenJDK Runtime Environment (build 19.0.1+10-Ubuntu-1ubuntu122.04)
OpenJDK 64-Bit Server VM (build 19.0.1+10-Ubuntu-1ubuntu122.04, mixed mode, sharing)
bb --version
?
Hm, that's newer than mine (1.0.166) but I can't reproduce with the newest one (1.0.170) either. I don't think that's it but can you upgrade babashka and try again?
that java 11 check is more trouble than it's worth. I thought I fixed the flakiness but I guess there are still edge cases. I removed the check (and also fixed the sloppy error in the die
function...). If you run bb -e "$(curl -s
again it should work now.
$ bb -e "$(curl -s )"
Enter name for project directory: trifecta
Enter main namespace (e.g. com.example): com.siq.trifecta
Your project is ready. Run the following commands to get started:
cd trifecta
git init
bb dev
And run `bb tasks` for a list of available commands.
https://clojurians.slack.com/archives/C013Y4VG20J/p1674406846118229?thread_ts=1674401978.226749&cid=C013Y4VG20J > that java 11 check is more trouble than it's worth Why is Java 11 required btw? Maybe the installer could test directly for the actual feature that it depends on (that is, unless you've definitely decided to get rid of the check)?
it's because recent versions of Jetty don't support Java 8 anymore (there's a note about it here, which is the Jetty adapter that biff uses: https://github.com/sunng87/ring-jetty9-adapter)
I think most people are on at least Java 11 now anyway; I doubt the check is doing much good in the first place. the getting started docs do mention the Java 11 requirement at least.
Oh, I see! Yeah, it makes perfect sense to drop it then 🙂
@pavlos @foo Would you be kind to help me with this?
$ bb dev
Cloning:
Checking out: at b3027b91cc208ea40f20d8c5b48d67ea2daf9d94
Downloading the latest version of Tailwind CSS...
After it finishes, you can avoid downloading Tailwind again for future projects if you copy it to your path, e.g. by running:
sudo cp bin/tailwindcss /usr/local/bin/
it's because bb is not under your home directory
Check this out: https://github.com/babashka/babashka#installer-script
> By default this will install into /usr/local/bin (you may need sudo for this). To change this, provide the directory name:
$ ./install --dir .
that part is totally optional too. when you start a new biff project for the first time it'll download tailwind into the project folder. if you make more projects in the future, it'll download tailwind each time. this is just saying that if you want to avoid downloading tailwind multiple times for multiple projects, you can install it to your system somewhere.
in the example command, sudo is where because /usr/local/bin
is a system folder, so you can't copy stuff to it unless you use sudo
[qtp156461227-46] INFO com.biffweb.impl.middleware - 3ms 200 get /img/glider.png
Click here to sign in as :
yep, that's the normal flow. you're welcome!