This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-04-10
Channels
- # aleph (4)
- # architecture (4)
- # aws (1)
- # beginners (64)
- # cider (26)
- # clara (9)
- # cljs-dev (45)
- # cljsrn (1)
- # clojars (8)
- # clojure (31)
- # clojure-finland (3)
- # clojure-italy (3)
- # clojure-nl (3)
- # clojure-poland (9)
- # clojure-spec (1)
- # clojure-uk (81)
- # clojurescript (35)
- # core-async (1)
- # cursive (33)
- # datomic (29)
- # editors (4)
- # emacs (2)
- # fulcro (22)
- # jobs (4)
- # leiningen (2)
- # off-topic (20)
- # onyx (1)
- # portkey (17)
- # proton (2)
- # re-frame (20)
- # reagent (36)
- # remote-jobs (1)
- # ring-swagger (1)
- # rum (2)
- # shadow-cljs (179)
- # slack-help (1)
- # spacemacs (1)
- # test-check (20)
you are not asking browser if it is old, with js/old
you are likely directly accessing window.old
and this window.old
does not exist under normal circumstances - it is not part of javascript standard, someone has to create it, you or some of your (javascript) libraries
Right - so some of the things I haven't included with this code may be defining old, so I ought to be including them. That makes sense. Need to work out which one of those libraries defined window.old
.
<script> var old = false; </script> <!--[if lte IE 8]> <script> old = true; </script>
It was that tiny bit of js in an index.html file that was not being called. I was using the wrong index.html file in other words.
@w Why is there an @
in that string require? That seems odd to me. Nonetheless, as I understand it, you should be able to do a string require. In case you are not familiar with the :npm-deps
feature, note that it really is an alpha-level feature and will break with difficult-to-debug error messages on quite a few npm modules. It also runs npm modules through advanced compilation, which simply won’t work on every npm include without some work. If you are going to include lots of npm modules in your program, this is how I see things: https://gist.github.com/jmlsf/f41b46c43a31224f46a41b361356f04d
It’s a NPM scoped package, they’re usually prefixed with @. I managed to sort this one, but getting an error about not being able to find stuff now. I’ll give shadow a go, thanks!
yea :npm-deps is promising tech but it’s painful to use if all you want to do is get stuff working in a reasonable way
Do npm-deps
not get :optimizations :advanced
compiled with :target :nodejs
? If so, why not?
I think I answered my question: https://clojurescript.org/news/2017-07-12-clojurescript-is-not-an-island-integrating-node-modules#_works_on_node_js_too. Is there any way to force it to minify node modules into a single file?
crossposting my problem with advanced compilation of leaflet. I don't get the problem... the ext-file has the geoJSON
-function but it throws an error when running as uberjar. Anyone has an idea?
Any obvious reason why this would not match the case:
(:import [goog.events KeyCodes]))
(when (#{KeyCodes.UP KeyCodes.DOWN KeyCodes.ENTER} code)
(case code
KeyCodes.ENTER (do something...)
...
Thanks! Will take a look
@thheller: @timok is getting a Uncaught TypeError: L.$geoJSON$ is not a function
but the externs file looks like it is specifying that function
I wish I knew more about the munging closure does. I’m wondering if the problem is in the symbol renaming one level up. i.e., geoJSON is not being munged but maybe the object it is attached to is
though i still don’t know why there are $
signs around its name if it is not being munged
:cljsbuild
{:builds
{:min
{:source-paths ["src/cljc" "src/cljs" "env/prod/cljs"]
:compiler
{:output-to "target/cljsbuild/public/js/app.js"
:optimizations :advanced
:closure-defines {dispatcher.env/DEV false}
:pretty-print true
:pseudo-names true
:print-input-delimiter true
:closure-warnings
{:externs-validation :off :non-standard-jsdoc :off}
:externs ["react/externs/react.js"]}}}}
@timok Leaflet extern defines geoJson
, looks like it should be geoJSON
instead.