duct 2026-01-20

Getting following error in browser console: shadow-cljs watch for build :server not running! Here is my duct.edn :

{:system
 {:duct.module/logging {}
  :duct.module/cljs
  {:builds {:client todo.client}}
  :duct.module/web
  {:features #{:site :api}}}}

Hot code reload is also not working

There are difficulties in integrating shadow-cljs and Duct, as shadow-cljs is designed as a command-line tool that has some limited API support, rather than as a library with a CLI built on top of it. The warning on the lack of a watch server is one of these incompatibilities that is hard to resolve without forking shadow-cljs. This warning should be ignored for now until I can figure out a better solution. Hot code reloading does work under Duct, but you need to explicitly run (reset), which will reload both the server and client code. This ensures the server and client are always in sync. Duct doesn't use a file watcher to automatically (reset) on every file change, as this complects saving files with reloading the application. In most editors with Clojure integration, you can assign a shortcut key to reloading, or a key to save and reload. That said, I am planning on adding a --watch argument to the duct/main CLI to accommodate editors with more limited integration. Using this would just run (reset) when a file change is detected.

1