# Clojurescript: repl-incompatible symbols

**URL:** https://clojureverse.org/t/clojurescript-repl-incompatible-symbols/5511
**Category:** Troubleshooting
**Tags:** clojurescript
**Created:** [February 25, 2020, 5:25pm UTC](https://clojureverse.org/t/clojurescript-repl-incompatible-symbols/5511 "2020-02-25T17:25:02Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Webdev\_Tory](https://clojureverse.org/user_avatar/clojureverse.org/webdev_tory/32/3781_2.png) [@Webdev\_Tory](https://clojureverse.org/u/Webdev_Tory)
#### Post date: [February 25, 2020, 5:25pm UTC](https://clojureverse.org/t/clojurescript-repl-incompatible-symbols/5511/1 "2020-02-25T17:25:02Z")

</div>

I’m using a library that provides `TimelineChart.TYPE.POINT` which, when entered in the browser console, returns `Symbol()`. Trouble is, whenever I attempt to do repl-driven development with it my repl errors when asked to display something with these symbols, throwing “Cannot convert Symbol to string.” This is a serious wrench in my workflow because the thing works in the browser (does its job), but my development as I massage my data-structures is all out-of-flow. I’m guessing that Symbol() needs some toString on it? Can anyone tell me what’s going on here?

---

<div class="post-metadata">

### Author: ![mraveloarinjaka](https://clojureverse.org/user_avatar/clojureverse.org/mraveloarinjaka/32/1922_2.png) [@mraveloarinjaka](https://clojureverse.org/u/mraveloarinjaka)
#### Post date: [February 25, 2020, 6:18pm UTC](https://clojureverse.org/t/clojurescript-repl-incompatible-symbols/5511/2 "2020-02-25T18:18:19Z")

</div>

I always add the following snippet in my “user” namespace loaded by the repl

```auto
(ns cljs.user)

(extend-type js/Symbol
  IPrintWithWriter
  (-pr-writer [obj writer _]
    (write-all writer (str "#object[" (.toString obj) "]"))))

```

---

<div class="post-metadata">

### Author: ![Webdev\_Tory](https://clojureverse.org/user_avatar/clojureverse.org/webdev_tory/32/3781_2.png) [@Webdev\_Tory](https://clojureverse.org/u/Webdev_Tory)
#### Post date: [February 25, 2020, 8:17pm UTC](https://clojureverse.org/t/clojurescript-repl-incompatible-symbols/5511/3 "2020-02-25T20:17:44Z")

</div>

> [@mraveloarinjaka](#):
>
> (extend-type js/Symbol IPrintWithWriter (-pr-writer [obj writer \_] (write-all writer (str “#object[” (.toString obj) “]”))))

I don’t use a user.cljs, but I stuck that somewhere and it works. Thanks!

---

<div class="post-metadata">

### Author: ![system](https://clojureverse.org/uploads/default/original/2X/5/51079bf9e4b7d9466242c06cf1e43b9f8bd6da14.png) [@system](https://clojureverse.org/u/system)
#### Post date: [August 26, 2020, 8:17am UTC](https://clojureverse.org/t/clojurescript-repl-incompatible-symbols/5511/4 "2020-08-26T08:17:47Z")

</div>

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.
