Here is the prod configuration used locally and in the uberjar for Heroku deployment:
{: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"]}}
But with the externs directive enabled for Heroku deployment, I get this error:
Jan 14, 2015 12:24:24 PM com.google.javascript.jscomp.LoggerErrorManager println
       SEVERE: ERROR - Duplicate extern input: /tmp/build_a17563dbd2ef7be695204764be886d91/resources/jquery/jquery-externs.js
       Jan 14, 2015 12:24:24 PM com.google.javascript.jscomp.LoggerErrorManager println
       SEVERE: ERROR - Duplicate extern input: /tmp/build_a17563dbd2ef7be695204764be886d91/resources/public/vendor/js/bootstrap.min.js
       Jan 14, 2015 12:24:24 PM com.google.javascript.jscomp.LoggerErrorManager printSummary
       WARNING: 2 error(s), 0 warning(s)
       ERROR: JSC_DUPLICATE_EXTERN_INPUT. Duplicate extern input: /tmp/build_a17563dbd2ef7be695204764be886d91/resources/jquery/jquery-externs.js at (unknown source) line (unknown line) : (unknown column)
       ERROR: JSC_DUPLICATE_EXTERN_INPUT. Duplicate extern input: /tmp/build_a17563dbd2ef7be695204764be886d91/resources/public/vendor/js/bootstrap.min.js at (unknown source) line (unknown line) : (unknown column)
       Successfully compiled "resources/public/js/main.js" in 38.526 seconds.
Any suggestions?
I don't believe this is an issue in lein 2.5.1. In any case, try :externs ^:replace ["jquery/jquery-externs.js" "public/vendor/js/bootstrap.min.js"] to mitigate.
I had a similar error, the problem was solved by adding some :exclusions.
In my case, I was using React with Addons and Reagent (which depends on React), hence the collision.
:dependencies [[cljsjs/react-with-addons "0.13.3-0"]
               [reagent "0.5.0"]
:dependencies [[cljsjs/react-with-addons "0.13.3-0"]
               [reagent "0.5.0" :exclusions [cljsjs/react]]
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With