reagent-project / reagent-template

A Leiningen template for projects using Reagent.
MIT License
394 stars 55 forks source link

Missing figwheel dependency #58

Closed jarcane closed 9 years ago

jarcane commented 9 years ago

After creating a new project with lein new reagent ... I discovered that the cljs side wouldn't build, because of this error:

Caused by: clojure.lang.ExceptionInfo: No such namespace: figwheel.client, could not locate figwheel/client.cljs or figwheel/client.clj at line 1 env\dev\cljs\wunderprojectj\dev.cljs

It seems dev.cljs makes use of the figwheel library, but it's not actually included in the template's project.clj.

Adding [figwheel "0.3.1"] to the cljs portion of the project.clj fixed the issue.

yogthos commented 9 years ago

what version of leiningen are you running, you can check using lein version. The current is 2.5.1, and can be upgraded using lein upgrade.

jarcane commented 9 years ago

Leiningen 2.5.1 on Java 1.7.0_67 Java HotSpot(TM) 64-Bit Server VM

yogthos commented 9 years ago

Hmm I'm not able to reproduce that. This is what I'm seeing locally after blowing away maven cache:

lein new reagent test-app
Retrieving reagent/lein-template/0.8.0/lein-template-0.8.0.pom from clojars
Retrieving reagent/lein-template/0.8.0/lein-template-0.8.0.jar from clojars
Generating fresh 'lein new' Reagent project.
Yogthos@Nyx ~/src/> cd test-app/
Yogthos@Nyx ~/src/test-app> lein figwheel
Retrieving reagent/reagent/0.5.0/reagent-0.5.0.pom from clojars
Retrieving reagent/reagent/0.5.0/reagent-0.5.0.jar from clojars
Figwheel: Starting server at http://localhost:3449
Focusing on build ids: app
Compiling "resources/public/js/app.js" from ["src/cljs" "env/dev/cljs"]...
Successfully compiled "resources/public/js/app.js" in 6.486 seconds.
Started Figwheel autobuilder

Launching ClojureScript REPL for build: app
Figwheel Controls:
          (stop-autobuild)                ;; stops Figwheel autobuilder
          (start-autobuild [id ...])      ;; starts autobuilder focused on optional ids
          (switch-to-build id ...)        ;; switches autobuilder to different build
          (reset-autobuild)               ;; stops, cleans, and starts autobuilder
          (build-once [id ...])           ;; builds source one time
          (clean-builds [id ..])          ;; deletes compiled cljs target files
          (fig-status)                    ;; displays current state of system
          (add-dep [org.om/om "0.8.1"]) ;; add a dependency. very experimental
  Switch REPL build focus:
          :cljs/quit                      ;; allows you to switch REPL to another build
    Docs: (doc function-name-here)
    Exit: Control+C or :cljs/quit
 Results: Stored in vars *1, *2, *3, *e holds last exception object
Prompt will show when figwheel connects to your application
To quit, type: :cljs/quit
cljs.user=>

the app loads fine in the browser

jarcane commented 9 years ago

I'm beginning to think it's another case of cryptic Windows incompatibilities. Under PC-BSD and the OpenJDK7 I don't get the issue, even without adding the figwheel dependency, and figwheel REPL works too, something that was failing under Windows.

On Thu, May 14, 2015 at 3:55 PM, Dmitri Sotnikov notifications@github.com wrote:

Hmm I'm not able to reproduce that. This is what I'm seeing locally after blowing away maven cache:

lein new reagent test-app Retrieving reagent/lein-template/0.8.0/lein-template-0.8.0.pom from clojars Retrieving reagent/lein-template/0.8.0/lein-template-0.8.0.jar from clojars Generating fresh 'lein new' Reagent project. Yogthos@Nyx ~/src/> cd test-app/ Yogthos@Nyx ~/src/test-app> lein figwheel Retrieving reagent/reagent/0.5.0/reagent-0.5.0.pom from clojars Retrieving reagent/reagent/0.5.0/reagent-0.5.0.jar from clojars Figwheel: Starting server at http://localhost:3449 Focusing on build ids: app Compiling "resources/public/js/app.js" from ["src/cljs" "env/dev/cljs"]... Successfully compiled "resources/public/js/app.js" in 6.486 seconds. Started Figwheel autobuilder

Launching ClojureScript REPL for build: app Figwheel Controls: (stop-autobuild) ;; stops Figwheel autobuilder (start-autobuild [id ...]) ;; starts autobuilder focused on optional ids (switch-to-build id ...) ;; switches autobuilder to different build (reset-autobuild) ;; stops, cleans, and starts autobuilder (build-once [id ...]) ;; builds source one time (clean-builds [id ..]) ;; deletes compiled cljs target files (fig-status) ;; displays current state of system (add-dep [org.om/om "0.8.1"]) ;; add a dependency. very experimental Switch REPL build focus: :cljs/quit ;; allows you to switch REPL to another build Docs: (doc function-name-here) Exit: Control+C or :cljs/quit Results: Stored in vars 1, 2, 3, e holds last exception object Prompt will show when figwheel connects to your application To quit, type: :cljs/quit cljs.user=>

the app loads fine in the browser

— Reply to this email directly or view it on GitHub https://github.com/reagent-project/reagent-template/issues/58#issuecomment-102028254 .

jarcane commented 9 years ago

After further experimentation, I found this was actually an issue with following outdated usage instructions, and in fact, making the change I mentioned in the original issue causes other problems elsewhere. Closing this. My apologies.