-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tick on shadow-cljs #21
Comments
Hi, that's strange. Which tick version are you on? And can you try the latest (released today) 0.4.6-alpha from clojars https://clojars.org/tick. Let me know if that fixes Thanks! |
I honestly have absolutely no idea why, but I gave it another try today and everything works fine even with 0.4.5-alpha. It must've been some weird issue related to my project. This minimal repro also works fine: $ clj -Srepro -Sdeps '{:deps {org.clojure/clojurescript {:mvn/version "RELEASE"} tick {:mvn/version "0.4.5-alpha"}}}' -m cljs.main
ClojureScript 1.10.339
cljs.user=> (require '[tick.alpha.api :as tick])
cljs.user=> (tick/now)
#jsr310/instant "2018-11-01T10:41:28.034Z" I'll close this issue. If it resurfaces, I'll try to look into it and post any findings here. |
I bumped into this again. I don't know why, but it appears that the issue only occurs with shadow-cljs. tick-issue-21.zip contains a minimal repro. To run it, extract the ZIP file, $ npx shadow-cljs watch app I'm not sure whether this is an issue with shadow-cljs or this library (or one of its dependencies). |
Ah. According to thheller/shadow-cljs#162, shadow-cljs doesn't support cljsjs dependencies. I suppose one possible way to fix the issue would be to migrate https://github.com/henryw374/cljs.java-time to shadow-cljs and use the |
ok thanks. I've got that compiling, see https://github.com/henryw374/tick-on-shadow-cljs-demo wip of course. any comments welcome |
I've been reading about npm-deps... sounds like it shouldn't be too hard to use that instead of cljsjs |
Yeah, I ended up using the same solution as in your demo: I included |
I've looked into npm-deps and had a branch working fine using it, but I think for now I'm not too happy requiring library users to have to have npm installed and part of their build. If npm-deps becomes more standard then perhaps. documented that here: 49cc67f I've updated the shadow demo project to use shadow-cljsjs and included the addon libs (timezone and locale) into the demo |
Evaluating
(require '[tick.alpha.api: as tick])
in a ClojureScript environment fails with this error:I tried adding an explicit dependency to
cljsjs/js-joda {:mvn/version "1.9.2-0"}
in mydeps.edn
, but that didn't have any effect.The text was updated successfully, but these errors were encountered: