This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-08-18
Channels
- # announcements (2)
- # beginners (95)
- # cider (2)
- # cljdoc (5)
- # cljs-dev (11)
- # cljsrn (2)
- # clojure (12)
- # clojure-spec (11)
- # clojure-uk (3)
- # clojurescript (27)
- # code-reviews (4)
- # cursive (9)
- # data-science (1)
- # datomic (1)
- # emacs (7)
- # fulcro (13)
- # graalvm (28)
- # graphql (6)
- # nrepl (6)
- # off-topic (13)
- # re-frame (3)
- # rewrite-clj (2)
- # shadow-cljs (29)
- # spacemacs (1)
- # sql (4)
- # tools-deps (8)
- # vim (20)
- # yada (7)
Hi Thomas, everyone. I'm trying to use @date-io/moment in conjunction with @material-ui/pickers as described at https://material-ui-pickers.dev/getting-started/installation (except via cljs). When I :require ["@date-io/moment" :default MomentUtils]
, the cljs repl tells me (undefined? MomentUtils) => true
. MomentUtils seems to be built from a TypeScript export default class
. The js rendition looks like var MomentUtils = (function () { function MomentUtils (_a) {...}; ...; return MomentUtils; }()); module.exports = MomentUtils
Other js libs are coming across fine. Is there something about the way MomentUtils is implemented which causes shadow-cljs to leave it undefined?
(could it be something to do with https://clojure.atlassian.net/browse/CLJS-3138 ?)
@clojure475 no it is related to default exports. They only work when the code is actually shipped as ESM but most of the time it is shipped as pre-compiled CommonJS. see the section about default exports here https://shadow-cljs.github.io/docs/UsersGuide.html#_about_default_exports
yeah it is an annoying situation currently. all currently released versions of webpack have a sort of hack to cheat CommonJS<->ESM interop so it sort of works in webpack
thanks for all your incredible work; I'm fiddling with juxt/tick now... and hand-shimming js-joda in the spirit of shadow-cljsjs... how do we get ourselves into these situations!?
I wish those shims weren't necessary but mixing cljsjs and npm is a recipe for disaster so you have to pick one and I went with npm
hi I have just installed shadow cljs and expo and I'm truing to run a project, have anybody faced such error?
Ī» shadow-cljs watch app
shadow-cljs - config: D:\Dev\clojure\rn-rf-shadow\shadow-cljs.edn cli version: 2.8.50 node: v10.9.0
shadow-cljs - starting via "clojure"
Exception in thread "main" java.io.FileNotFoundException: -A:dev (The system cannot find the file specified)
at java.base/java.io.FileInputStream.open0(Native Method)
at java.base/java.io.FileInputStream.open(FileInputStream.java:213)
at java.base/java.io.FileInputStream.<init>(FileInputStream.java:155)
at java.base/java.io.FileInputStream.<init>(FileInputStream.java:110)
at clojure.lang.Compiler.loadFile(Compiler.java:7083)
at clojure.main$load_script.invoke(main.clj:274)
at clojure.main$script_opt.invoke(main.clj:336)
at clojure.main$main.doInvoke(main.clj:420)
at clojure.lang.RestFn.invoke(RestFn.java:619)
at clojure.lang.Var.invoke(Var.java:430)
at clojure.lang.AFn.applyToHelper(AFn.java:195)
at clojure.lang.Var.applyTo(Var.java:700)
at clojure.main.main(main.java:37)
I have intuition that I have this error because I work on Windows and I made a trick to use clojure
, by default I has only clj
in console.
@titov on windows it is expected that you are using the "official" windows distribution. see https://github.com/clojure/tools.deps.alpha/wiki/clj-on-Windows
@thheller yeah I've just wanted to write that my approach was wrong, for those who will have this error in future don't follow my path don't install clojure with choco
and don't create copy of clj.bat with name cljure.bat, use developers instructions
I wasn't aware there are other approaches. If there are other solutions in other package managers I can add some kind of detection
There is a way: https://chocolatey.org/packages/clojure
deps.edn didn't even exist back then so that seems like an entirely different thing?
idk, definitely I'm not going to use it heh, the author of choco package should update his module