     (do (println "Figwheel: Configuration validation failed. Exiting ...")
         false)))
 
-(with-color
-  (fc/system-exit-assert
-   (= _figwheel-version_ figwheel-sidecar.config/_figwheel-version_)
-   (str "Figwheel version mismatch!!\n"
-        "You are using the lein-figwheel plugin with version: " _figwheel-version_ "\n"
-        "With a figwheel-sidecar library with version:        " fc/_figwheel-version_ "\n"
-        "\n"
-        "These versions need to be the same.\n"
-        "\n"
-        "Please look at your project.clj :dependencies to see what is causing this.\n"
-        "You may need to run \"lein clean\" \n"
-        "Running \"lein deps :tree\" can help you see your dependency tree.")))
+(defn check-version-match []
+  (with-color
+    (let [sidecar-version (figwheel-sidecar-version)]
+      (fc/system-exit-assert
+       (= _figwheel-version_ sidecar-version)
+       (str "Figwheel version mismatch!!\n"
+            "You are using the lein-figwheel plugin with version: " (pr-str _figwheel-version_) "\n"
+            "With a figwheel-sidecar library with version:        " (pr-str sidecar-version) "\n"
+            "\n"
+            "These versions need to be the same.\n"
+            "\n"
+            "Please look at your project.clj :dependencies to see what is causing this.\n"
+            "You may need to run \"lein clean\" \n"
+            "Running \"lein deps :tree\" can help you see your dependency tree.")))))
 
 (defn figwheel
   "Autocompile ClojureScript and serve the changes over a websocket (+ plus static file server)."
   [project & build-ids]
+  (check-version-match)
   (fc/system-asserts)
   (when-let [config-data (validate-figwheel-conf project)]
     (let [{:keys [data] :as figwheel-internal-data}

;; well this is private in the leiningen.cljsbuild ns
(defn- run-local-project [project builds requires form]
  (let [project' (-> project
                   (update-in [:dependencies] conj ['figwheel-sidecar fc/_figwheel-version_])
                   (update-in [:dependencies] conj ['figwheel fc/_figwheel-version_])
                   (make-subproject builds))]
    (leval/eval-in-project project'
     `(try

   [clojure.pprint :as pp]
   [leiningen.core.eval :as leval]
   [leiningen.core.project :as lproj]
   [leiningen.core.utils :as lutils]
   [clojure.java.io :as io]
   [figwheel-sidecar.config :as fc]
   [figwheel-sidecar.config-check.ansi :refer [with-color]]))

(def _figwheel-version_ "0.5.4-SNAPSHOT")

(defn figwheel-sidecar-version []
  (when-let [version-var (resolve 'figwheel-sidecar.config/_figwheel-version_)]
     @version-var))

(defn make-subproject [project builds]
  (with-meta
