1

I have just added the [hiccup "1.0.3"] dependency to my project.clj, but now I can't start the repl anymore. Each time I try, I get:

Caused by: java.io.FileNotFoundException: Could not locate hiccup/page_helpers__init.class or hiccup/page_helpers.clj

Ideas? As soon as I remove hiccup from my dependencies, everything compiles just fine.

(defproject projectname "0.1.0-SNAPSHOT" 
:description "FIXME: write description"
:url "http://example.com/FIXME"
:license {:name "Eclipse Public License"
        :url "http://www.eclipse.org/legal/epl-v10.html"}
:dependencies [[org.clojure/clojure "1.5.1"]
             [com.datomic/datomic-free "0.8.4007"]
             [ring-serve "0.1.2"]
             [ring/ring-core "1.1.8"]
             [compojure "1.1.5"]
             [hiccup "1.0.3"]]
:profiles {:dev {:source-paths ["dev"]
               :dependencies [[org.clojure/tools.namespace "0.2.3"]
                              [org.clojure/java.classpath "0.2.0"]]}})
TG-T
  • 2,174
  • 3
  • 19
  • 20
  • Can you post your project.clj? Did you run lein deps after changing and saving project.clj – yeh Jun 20 '13 at 09:40
  • edited to include it. I did run lein deps. – TG-T Jun 20 '13 at 09:55
  • Run `lein deps :tree` with it in your project.clj and without it. Perhaps there's a dependency that requires an older version that has the namespace in question? – Jeremy Jun 20 '13 at 15:09
  • That was it - ring-serve includes hiccup 0.3.7 (no clue why). Put that as an answer and I'd accept it. – TG-T Jun 20 '13 at 15:46

2 Answers2

2

Try running lein deps :tree with it in your project.clj and again without it. Perhaps there's a dependency that requires an older version that has the namespace in question? The current version of hiccup does not have the hiccup.page-helpers namespace.

Jeremy
  • 22,188
  • 4
  • 68
  • 81
1

Your format is wrong. I've no idea if you made the mistake only in the post, or you acctually missed a ']' after [hiccup "1.0.3"]. How did you start repl. I run lein repl and everything is fine. Make sure you successfully retrieve all deps after running lein deps. It's easy to find out if error occurs during that process.

yeh
  • 1,496
  • 14
  • 35
  • The mistake is only in the post; my project.clj has the required ']'. I use `nrepl-jack-in` in emacs, but `lein repl` gives the same error. I have run `lein deps` and it gives no output. – TG-T Jun 20 '13 at 15:02
  • @TimothyGalebach That's weird. The error doesn't occur on my machine. Which version of leiningen did you use? – yeh Jun 20 '13 at 23:41