This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
I've spent a number of hours now trying to get a basic datascript example working. Can anyone see what I'm going wrong? I start lein figwheel
, refresh my browser and run this:
cljs.user=> (require '[datascript :as d])
cljs.user=> (d/create-conn {})
#<TypeError: Cannot read property 'call' of undefined>
The project is so simple that I'm sure I must be making a silly mistake. Here's the repo: https://github.com/bmaddy/prochaine
Has anyone else run into this error?I originally thought it was this issue: https://github.com/tonsky/datascript/issues/57, but changing the namespace from prochaine.datascript
to prochaine.ds
didn't fix things.
I tried to see if updating clojurescript & datascript would help, but that seems to break your om version ; /
This version works without datascript, I think specifically with clojurescript version 0.0-3308
.
I'm trying all cljs versions from the newest down to the first one that works to see if that helps.
Ok, I need to take off. Thanks again for taking a quick look at this--I really appreciate it!
Someone in #C03S1L9DN said upgrading figwheel to 0.3.9 fixes it. I'll try that when I get back. Thanks again for your help!
@bmaddy: I got this working. What I did in order:
1. updated datascript to 0.11.6 and clojurescript to 1.7.122
2. this broke om (due to the syntax error I linked) so I had to use om as a checkout dependency - https://github.com/technomancy/leiningen/blob/master/doc/TUTORIAL.md#checkout-dependencies - and account for some changes in the latest version
3. om was fixed, but datascript still didn't load; I updated figwheel to 0.3.9 but it didn't help either
4. I added {:warnings {:single-segment-namespace false}}
to compiler options and this finally did it