juxt

noprompt 2021-06-07T19:32:13.003Z

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].

👍 1
2021-06-07T19:46:14.003900Z

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

2021-06-07T19:47:00.004100Z

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

noprompt 2021-06-07T19:51:06.004400Z

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.

2021-06-07T19:53:28.004600Z

tick ver can be bumped too..

noprompt 2021-06-07T19:55:31.004800Z

K. Doing that.

2021-06-07T19:56:28.005Z

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

noprompt 2021-06-07T19:57:59.005300Z

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

2021-06-07T19:58:44.005500Z

Hope so

noprompt 2021-06-07T19:58:51.005700Z

Boom. Yes. Thank you. 🙂

2021-06-07T20:00:01.005900Z

Great! 👍