Fork me on GitHub

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)))
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 -------------------------------------------------------------- - <expr>:66:1     - <expr>:73:5
clojure.core/apply          - <built-in>     - <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)


I'm running this command

bb -e "$(curl -s )"


which bb


I'm Running Ubuntu 22


$ bb --version
babashka v1.0.169


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?

Jacob O'Bryant17:01:46

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.

🎉 4

This looks like it works now. Thank you.

👍 2
pavlosmelissinos17:01:54;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)?

Jacob O'Bryant17:01:18

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:

Jacob O'Bryant17:01:19

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.

👍 2

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
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/


Looks like I have to run it with sudo


But Why do I have to do use sudo


it's because bb is not under your home directory


Shit, thank you, let me re install the whole setup!


Check this out: > By default this will install into /usr/local/bin (you may need sudo for this). To change this, provide the directory name:

$ ./install --dir .


Thanks even more.

Jacob O'Bryant17:01:10

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.

👍 2
Jacob O'Bryant17:01:27

the message is unrelated to babashka, no need to install that again

facepalm 2

Ok? Let me try that!

👌 2
Jacob O'Bryant17:01:39

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


👍 can't wait to start the documentation.


I presume this is normal


[qtp156461227-46] INFO com.biffweb.impl.middleware -   3ms 200 get  /img/glider.png
Click here to sign in as : 

Jacob O'Bryant19:01:47

yep, that's the normal flow. you're welcome!