简体   繁体   中英

lein ring server does not automatically rebuild

I am writing a small clojurescript project and I followed the numerous lein cljsbuild examples that use lein ring as a development web server.

I used to run lein ring server to serve the website on my local machine. Now it seems that lein ring server does not automatically rebuild and restart when I change the clj files that contain the hiccup html definitions.

According to https://github.com/weavejester/lein-ring this should be the case (maybe I have misread, but it says that reloading should be the default).

My project.cljs is more or less equivalent to https://github.com/emezeske/lein-cljsbuild/blob/master/example-projects/advanced/project.clj

Any ideas?

I've had the same problem and ends up the cause was that I was requiring a library before declaring the namespace, requiring it the line below the namespace made it work. So it was like:

(require 'clojure.pprint)
(ns app.core)

and I changed to:

(ns app.core)
(require 'clojure.pprint)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM