Fork me on GitHub
#juxt
<
2023-11-02
>
grounded_sage12:11:35

I am having some trouble using Tick from Clojurescript. I am getting this error in the browser console. user.cljs:8 Locale is nil, try adding a require '[tick.locale-en-us] I have these in my package.json

"@js-joda/core": "^5.6.1",
    "@js-joda/locale_en-us": "^4.8.11",
and am using tick/tick {:mvn/version "0.7.5"}

henryw37412:11:54

someone (you work with? 😉 ) just raised this yesterday actually - see https://github.com/juxt/tick/issues/192 if you use the versions brought in from deps.cljs dependencies of tick it will work

grounded_sage12:11:55

I am solo. But yea this is the same issue. I also have "@js-joda/timezone": "2.18.2" and still get this error.

grounded_sage12:11:42

Is there documentation on what is the working version configurations?

henryw37412:11:53

ok weird coincidence then. ok but its the locale+core deps that cause this issue

henryw37412:11:09

no docs, other than deps.cljs files. which ofc is the official way for cljs libs to depend on npm. although being clojurescript official is relative. one sec I will see what they are

grounded_sage12:11:34

I'm building a custom interactive candlestick chart and kind of blocked with this not working.

grounded_sage12:11:13

Oh I am not familiar with deps.cljs as a file

grounded_sage12:11:26

so I add those into my package json?

👍 1
henryw37412:11:34

or... as per docs clj -m cljs.main --install-deps will put them in your package.json. but only if you dont have them already afaik

grounded_sage12:11:09

I have a tendency to skim docs sometimes. So I did miss that. I just saw the error and did a yarn add then started debugging from there 😅

henryw37412:11:45

yeah no worries. afaik these days the trend is for libs not to provide deps.cljs. so maybe thats the way to go. and then docs point ppl to test build to show what npm ver it has been tested on

grounded_sage12:11:44

That script added a bunch of other what seems unrelated packages. I guess this is with other libraries I am using?

"katex": "^0.12.0",
    "markdown-it": "^12.3.2",
    "markdown-it-block-image": "^0.0.3",
    "markdown-it-footnote": "^3.0.3",
    "markdown-it-texmath": "^0.9.7",
    "markdown-it-toc-done-right": "^4.2.0",
    "punycode": "^2.1.1",

henryw37412:11:47

lets hope leftpad not in there

grounded_sage12:11:33

Well this did the trick. Thank you!

grounded_sage12:11:59

I have required [tick.locale-en-us]