hey all! A lot of the commands in the docs like clj -M:dev generate-config and clj -M:dev generate-secrets return errors like:
> clj -M:dev generate-secrets
Execution error (FileNotFoundException) at java.io.FileInputStream/open0 (FileInputStream.java:-2).
generate-secrets (No such file or directory)
Should I copy them from https://github.com/jacobobryant/biff/blob/master/tasks/src/com/biffweb/tasks.clj? Were they supposed to be generated with the clj -M -e '(load-string (slurp ""))' command?
Thanks!actually, I'm not sure what happened here, it's working now. I see that the biff tasks should be merged
(def tasks (merge tasks/tasks custom-tasks))
and I assume tasks gets read by biff somewhereIs it possible you were in a subdirectory instead of the project root? I can reproduce the error message if I do that:
0 ~/dev/biff/starter $ clj -M:dev generate-secrets
Put these in your config.env file:
COOKIE_SECRET=jYGnoWoYGJZ9eA3rA1ZuNw==
JWT_SECRET=O/+hZ/in5M/uOvMOlB8/FjtG6o7g18dxOSBitSrHn8w=
0 ~/dev/biff/starter $ cd src/
0 ~/dev/biff/starter/src $ clj -M:dev generate-secrets
Execution error (FileNotFoundException) at java.io.FileInputStream/open0 (FileInputStream.java:-2).
generate-secrets (No such file or directory)
Full report at:
/tmp/clojure-10187251295750197119.edn
tasks/tasks is defined here: https://github.com/jacobobryant/biff/blob/502a4f5414a82ab96c7fd6809aef142bf807c0e7/libs/tasks/src/com/biffweb/tasks.clj#L425. There's a dependency on that library in your deps.edn file under the :dev alias. those are the default tasks; you can override them if you putting tasks with the same keys in custom-tasks.
The tasks.clj file you linked to before is only there for backwards-compatibility--those are the tasks from when Biff was using Babashka tasks instead of plain-clojure tasks.it must’ve been that! Thanks for further explanation 🙏