Hello, I'm trying to use tick but fails when used in a cljs source:
(ns myapp.conf
(:require [tick.core :as t]))
(t/>> (t/now) (t/new-duration 10 :hours))
;;
Execution error (TypeError) at (<cljs repl>:1).
tick.core._GT__GT_ is undefined
However, it worked from the repl:
$ npm install shadow-cljs --save-dev && npx shadow-cljs browser-repl
removed 54 packages, and audited 320 packages in 2s
46 packages are looking for funding
run `npm fund` for details
found 0 vulnerabilities
shadow-cljs - config: /Users/[path]/project/shadow-cljs.edn
shadow-cljs - connected to server
running: npm install --save --save-exact @js-joda/timezone@2.5.0 @js-joda/locale_en-us@3.1.1 @js-joda/core@3.2.0
added 3 packages in 4m
46 packages are looking for funding
run `npm fund` for details
> (require '[tick.core :as t])
nil
cljs.user=> (t/today)
#time/date "2024-03-12"
cljs.user=>
The deps in package.json are:
"@js-joda/core": "3.2.0",
"@js-joda/locale_en-us": "3.1.1",
"@js-joda/timezone": "2.5.0",
and I'm using shadow-cljs v2.27.5It should be t/>>, the example is copied from https://juxt.github.io/tick/#_tick_reference
The error specifically says it can't find t/>> which you did not show working in the repl.
Perhaps this is an issue with exports or advanced compilation munging the function name... You might do better to ask in #clojurescript and provide more details about your various project config files to show how you are building the app that throws that error...
Got it, I’ll ask there, thank you Sean!
Did you mean ->> or -> rather than t/>> perhaps?
is this the right place to ask a question about aero and get-config