Fork me on GitHub

I'm having trouble getting transit to work on the cljs 1.8 and 1.9 and rhino repl, I get this error trying to read a json string, is this a known issue?:

org.mozilla.javascript.EcmaError: TypeError: Cannot call property call in object [JavaPackage com.cognitect.transit.reader]. It is not a function, it is "object". (rhino.clj#41)


seems to work fine in the browser


@netchkin: I use Windows for clojurescript all the time with Reagent. How are you trying to run your program?


@shaun-mahood: I have followed this guide: and created this related issue: I compile the code with lein cljsbuild once server, then use node [path]/server.js to run it


hey guys, What do you suggest for testing clojurescript code ? I'm looking something simple and elegant, something like minitest for ruby


@lxsameer I think the current “standard” is to use cljs.test


I’m not familiar with Ruby at all, though, I don’t know what minitest is


thanks buddy, what aboud doc generator @anmonteiro


a documentation generation library for ClojureScript apps / libraries?


for a library containing both cljs and clj


which is more general but also contains a documentation generator


thanks, I'm using codeina but it seems i can't force it to use both :clojure and :clojurescript readers


I’ve only ever used codox so I can’t help you there


thanks for the handful information 🙂


@anmonteiro what about codax ? how can i configure it to support both clj and cljs in the same project ?


never tried it, sorry


@anmonteiro It doesn’t help you now, but I am working on a documentation generator that will handle hybrid clj/cljs projects. I started working on it principally because I want to generate documentation for Dash, but it should be usable as a more general doc generator, as well.


@gtrak there could be bug in Rhino - there’s lots of little weird things that don’t work in that environment with respect to JS


@gtrak if you can hunt down the cause I could consider a fix to transit, but it’s not a priority enough for me to spend any time on finding the cause myself


@netchkin your error seems truncated, but it seems pretty clear that it can’t load some file


@nfisher did you try a simpler example like just following the guide first?


@nfisher to your other question - unknown - more people need to try the feature - I’m sure there are bugs


fortunately there are several people actively contributing to ClojureScript willing to see those issues get squashed, so try stuff and report


@dnolen thanks! I might look into it.


Ok cool thanks I’ll try to recreate a minimal test case. Currently in dependency fun-time…


@dnolen: actually, the error itself is the full output from console. The eact seems strange (of course it should be react). In combination with apparently incorrect path joining (C:\dev\my\testingcljs\reag2\demo\resourcespublicjsserver-side, obviously should have been C:\dev\my\testingcljs\reag2\demo\resources\publicjs\server-side), I think something in the compile or run process does not deal well with windows "\" path separator...


@dnolen got it working. I was expecting it to be name spaced. After reading this doc I noticed that require can sometimes drop :foreign-libs in the js/ global namespace rather than the :provides


Got a working example here using :foreign-libs and lein:


@shaun-mahood & @dnolen: thanks for helping me so far, guys. I have noticed that when cljs compiles to js, probably part of this stuff in reagent: (ns reagent.impl.util (:require [cljsjs.react] [reagent.debug :refer-macros [dbg log warn]] [reagent.interop :refer-macros [$ $!]] [clojure.string :as string])) gets compiled as this in js: cljs.core.load_file("resources\public\js\server-side\"); the \r in react gets then interpreted as carriage return character, which is the root of the problem...


@netchkin: It's probably worth looking at it again, clojurescript and reagent both work very well with windows and shouldn't have any problem with any of the path seperators or line endings. The error message may not be helpful, but the issue is almosy guaranteed to be in your code and not the compiler or libraries.


@netchkin: if you can post your full code somewhere I can take a look and see if I can find any issues.


@shaun-mahood: interesting, I'll try to take a look again, then... I was just starting to blame leiningen 🙂


@shaun-mahood: of course, just a sec


@netchkin: ok thanks, I'll try and look at it this afternoon


I'm making my first fullstack React application in cljs. I'm trying to get a page to pull data from my server, then stick it in a datascript db to build views against. But I can't seem to get my transact! function to run.


if anyone has a moment to take a look, I'd greatly appreciate it. I'm stuck.


I thought it might be a problem with asynchrony; yet, the transact function is in a handler given to the AJAX call which I thought meant it would only run once the call had completed. idk


note: currently there's a state atom in addition to the datascript db; that's what i'm aiming to replace