This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-12-14
Channels
- # adventofcode (107)
- # aleph (1)
- # announcements (8)
- # beginners (57)
- # boot (3)
- # braveandtrue (18)
- # calva (374)
- # cider (6)
- # cljdoc (8)
- # cljs-dev (140)
- # clojure (199)
- # clojure-berlin (5)
- # clojure-europe (3)
- # clojure-finland (1)
- # clojure-hamburg (4)
- # clojure-italy (17)
- # clojure-nl (16)
- # clojure-spec (2)
- # clojure-uk (70)
- # clojurescript (29)
- # component (2)
- # cursive (10)
- # datomic (44)
- # docker (1)
- # figwheel (3)
- # fulcro (13)
- # immutant (2)
- # juxt (5)
- # leiningen (53)
- # nrepl (3)
- # off-topic (7)
- # pedestal (3)
- # re-frame (7)
- # ring (3)
- # ring-swagger (5)
- # rum (5)
- # shadow-cljs (14)
- # spacemacs (6)
- # specter (12)
- # tools-deps (11)
- # unrepl (11)
- # vim (7)
So I've run into a problem with requiring an npm module, "auth0-js", that the files it produces aren't named the way that shadow-clj expects. Instead of being "auth0-js.js", the files are just called "auth0.js". https://github.com/auth0/auth0.js/blob/master/package.json Are there any work -a-rounds for this?
Ok, sorry. I'm going to look into this more on my end. It looks like I was misreading an error message.
I think I’ve found my issue… I have a require statement as such:
(ns
(:require ["auth0-js" :as ajs]))
But when I run shadow-cljs watch frontend
This error pops up in my console:
"shadow.js.js:87 shadow-cljs - failed to load module$node_modules$auth0_js$dist$auth0_min"
I think what’s happening is that the “auth0-js” is getting converted to “auth0_js”, but npm doesn’t follow the naming convention where a -
translate to a folder structure with an _
.
I’ve got a repo here to recreate the issue:
https://github.com/justinbarclay/auth0-js-bugit just tells you that it failed to load that file because of some error that occured while loading the file
auth0-js
will always be renamed to auth0_js
since auth0-js
is auth0 - js
in javascript since -
is an operator
Awesome! That worked wonderfully, thank you for your time!
Is this config used directly by the closure compiler? I’m wondering where else I should be looking next time I run into an issue like this