I have identical cljs compiler settings for my local development (main) and for 
an uberjar deployed to Heroku.  While the local version (lein run) works fine, 
the uberjar version (foreman start) which is deployed to Heroku gives this 
error:

Reference Error: pts is not defined.

`pts` is of course the namespace for the entry point.


Sorry for the commented-out lines which won't show up nicely in google 
groups....

(defproject pts "1.0.0-SNAPSHOT"
  :description "Public Talk Scheduler"
  :url "http://pts-dev.herokuapp.com";
  :min-lein-version "2.5.0"
  :dependencies [[org.clojure/clojure "1.6.0"]
                 [org.clojure/clojurescript "0.0-3058"]
                 [org.clojure/core.async "0.1.346.0-17112a-alpha"]
                 [http-kit "2.1.19"]
                 [ring "1.3.2"]
                 [reagent "0.5.0-alpha"]
                 [cljs-ajax "0.3.10"]
                 [compojure "1.3.2"]
                 [ring-middleware-format "0.4.0"]
                 [cheshire "5.4.0"]
                 [clj-pdf "2.0.0"]
                 [jayq "2.5.4"]
                 [com.draines/postal "1.11.3"]
                 [org.postgresql/postgresql "9.3-1101-jdbc4"]
                 [yesql "0.4.0"]
                 [clj-time "0.9.0"]
                 [com.cemerick/friend "0.2.1"]
                 [clj-jwt "0.0.12"]
                 [clojurewerkz/scrypt "1.2.0"]
                 [org.clojure/data.codec "0.1.0"]
                 [org.clojure/data.csv "0.1.2"]
                 [org.clojure/core.cache "0.6.4"]
                 [environ "1.0.0"]]
  :plugins [[lein-cljsbuild "1.0.5"]
            [com.cemerick/clojurescript.test "0.3.2"]
            [lein-environ "1.0.0"]]
  :profiles {:dev
             {:dependencies [[ring-mock "0.1.5"]
                             [org.clojars.runa/conjure "2.1.3"]]
              ;;:plugins [[com.cemerick/austin "0.1.6"]]
              :cljsbuild
              {:test-commands
               {"unit-test" ["phantomjs" :runner "resources/es5-shim.js" 
"resources/public/js/unit-test.js"]}
               :builds
               {:test
                {:source-paths ["src/cljs" "test/cljs" "env/dev/cljs"]
                 :compiler {:output-to "resources/public/js/unit-test.js"
                            :optimizations :whitespace
                            :pretty-print true
                            :preamble ^:replace ["jquery/jquery-2.1.1.min.js" 
"reagent/react.js"]}}
                :main
                {:source-paths ["src/cljs"]
                 :compiler {:output-to "resources/public/js/main.js"
                            ;;:output-dir "resources/public/js/out"
                            :optimizations :advanced
                            ;;:main "pts.home"
                            ;;:main ;; for use with :optimizations :none
                            ;;:asset-path ;; see above
                            ;;:source-map true ;; only with :optimizations 
:none, others need path
                            ;;:verbose true
                            ;;:foreign-libs ;; learn this!!!
                            ;;:externs ;; learn this!!!
                            ;;:modules ;; learn this!!!
                            ;;:cache-analysis true
                            :externs ["jquery/jquery-externs.js" 
"public/vendor/js/bootstrap.min.js"]
                            :preamble ["jquery/jquery-2.1.1.min.js" 
"public/vendor/js/bootstrap.min.js" "reagent/react.js"]
                            }}}}
              :repl-options {:init-ns pts.server
                             :nrepl-middleware 
[cemerick.piggieback/wrap-cljs-repl]}
              :source-paths ["env/dev/clj"]
              :env {:dev? false}}

             :uberjar
             {;;:dependencies [[org.clojure/clojurescript "0.0-3058"]] ; 3058, 
2985
              :hooks [leiningen.cljsbuild]
              :main pts.server
              :aot [pts.server]
              :uberjar-name "pts.jar"
              :cljsbuild {:builds
                          {:prod
                           {:source-paths ["src/cljs"]
                            :compiler {:output-to "resources/public/js/main.js"
                                       :optimizations :advanced
                                       ;;:cache-analysis true
                                       ;;:static-fns true
                                       ;;:elide-asserts true
                                       ;;:pretty-print false
                                       :externs ["jquery/jquery-externs.js" 
"public/vendor/js/bootstrap.min.js"]
                                       :preamble ["jquery/jquery-2.1.1.min.js" 
"public/vendor/js/bootstrap.min.js" "reagent/react.js"]
                                       }}}}}}
  :hooks [leiningen.cljsbuild]
  :main pts.server
  :aliases {"testall" ["do" ["clean"] ["test"] ["cljsbuild" "test"]]
            "omni" ["do" ["clean"] ["deps" "tree"] ["ancient"] ["kibit"] 
["bikeshed"]]}
  ;;:global-vars {*warn-on-reflection* true}
  :source-paths ["src/clj" "src/sql" "src/cljs" "target/classes"]
  :test-paths ["test/clj" "test/cljs"]
  :clean-targets ^{:protect false} ["resources/public/js"]
  :repl-options {:timeout 180000})

-- 
Note that posts from new members are moderated - please be patient with your 
first post.
--- 
You received this message because you are subscribed to the Google Groups 
"ClojureScript" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/clojurescript.

Reply via email to