Search code examples
clojurescriptfigwheel

ClojureScript: Getting Figwheel REPL up and running


I am attempting to launch a figwheel repl for working in the browser. I get the following message when I point the browser to my local server:

Figwheel Server: Resource not found Keep on figwheelin'

The shell shows the following message, but it doesn't go on to start a repl:

Prompt will show when Figwheel connects to your application

Here is my project.clj:

(defproject new-poker "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.8.0"]
             [org.clojure/clojurescript "1.9.908"]]
 :plugins [[lein-figwheel "0.5.13"]]
 :cleantargets [:target-path "out"]
 :cljsbuild {
           :builds [{:id "dev"
                    :source-paths ["src"]
                    :figwheel true
                    :compiler {:main "new-poker.core"
                               :asset-path "js/out"
                               :output-to "resources/public/js/main.js"
                               :output-dir "resources/public/js/out"}
                    }]
          }

)


Solution

  • There could be any number of issues, and it's hard to say w/o seeing the entirety of it.

    However, if I were you, then I would try generating a new project with lein-figwheel plugin, and then start comparing that project.clj to then one you're attempting to write in an effort to figure out if you're missing something from the project.clj file. I would also look at what files it is generating to see if maybe you'd missed a file, and after that I'd start looking at the content of the generated html/clojurescript to see if something is not quite right there.

    Another option, if you're not all that interested in the project setup learning experience, is to just use the output from the lein-figwheel plugin outright and go from there.