Fork me on GitHub
#clj-kondo
<
2021-12-10
>
Noah Bogart18:12:15

I want to use the javascript library moment in my code, which i’m using from an npm module. i require it with (ns example (:require [moment])) and then when I use it (-> (:date item) js/Date. moment (.format "MMM Do YYYY")), I get “unresolved symbol: moment” errors. any suggestions on how to write the require such that this is resolved?

borkdude18:12:42

@nbtheduke The solution is to always use strings for npm libs

Noah Bogart18:12:13

oh! huh, cool