Fork me on GitHub
#juxt
<
2021-06-07
>
noprompt19:06:13

I’m having some trouble getting tick formatting to working with CLJS. I’ve followed the docs but continue to see

SHADOW import error /<path>/.shadow-cljs/builds/test/dev/out/cljs-runtime/<file>.js

/<path>/.shadow-cljs/builds/test/dev/out/cljs-runtime/tick/format.cljc:29
(defn ^DateTimeFormatter formatter

Error: Locale is nil, try adding a require '[tick.locale-en-us]
though I have required [tick.locale-en-us].

👍 2
henryw37419:06:14

Hmm. Can you check jsjoda locale is in package.json? Although tbh I'd expect some other error if it weren't.

henryw37419:06:00

Are you on Recent versions of cljs, tick, shadow etc?

noprompt19:06:06

In package.json I have

"@cljs-oss/module-deps": "^1.1.1",
    "@js-joda/core": "^1.12.0",
    "@js-joda/locale_en-us": "3.1.1",
    "@js-joda/timezone": "2.2.0",
Shadow is 2.8.110 (will update), tick is 0.4.24-alpha.

henryw37419:06:28

tick ver can be bumped too..

noprompt19:06:31

K. Doing that.

henryw37419:06:28

The ns require just loads the joda locale and sets a variable https://github.com/juxt/tick/blob/master/src/tick/locale_en_us.cljc

noprompt19:06:59

I saw that. 🙂 I’m fixing up my package.json after bumping the tick version and hoping this resolves the issue.

noprompt19:06:51

Boom. Yes. Thank you. 🙂