This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-06-26
Channels
- # announcements (6)
- # beginners (328)
- # boot (2)
- # cider (72)
- # clara (6)
- # cljdoc (4)
- # cljsrn (5)
- # clojure (78)
- # clojure-europe (3)
- # clojure-italy (22)
- # clojure-nl (4)
- # clojure-spec (3)
- # clojure-uk (114)
- # clojurescript (22)
- # clojurex (54)
- # copenhagen-clojurians (1)
- # core-async (20)
- # cursive (8)
- # data-science (1)
- # datomic (22)
- # duct (11)
- # emacs (32)
- # events (1)
- # figwheel (2)
- # fulcro (18)
- # graalvm (53)
- # graphql (39)
- # luminus (6)
- # nrepl (6)
- # off-topic (53)
- # om (1)
- # re-frame (8)
- # reagent (19)
- # reitit (3)
- # shadow-cljs (28)
- # spacemacs (10)
- # sql (37)
- # tools-deps (33)
- # vim (9)
- # xtdb (6)
:man-raising-hand: @thheller I'm probably doing something stupid but I can't seem to import this expo module. https://docs.expo.io/versions/latest/sdk/filesystem/. I think I'm doing it correctly according to shadow-cljs import directions. https://shadow-cljs.github.io/docs/UsersGuide.html#_using_npm_packages.clojure But it doesn't seem to work.
(ns time-align-mobile.handlers
(:require
["expo-file-system" :as FileSystem :refer [documentDirectory]]
...
;; Then after loading the namespace into the repl
cljs.user> (ns time-align-mobile.handlers)
time-align-mobile.handlers
time-align-mobile.handlers> (identity FileSystem)
nil
time-align-mobile.handlers> documentDirectory
;; output cleared
time-align-mobile.handlers> (.-documentDirectory FileSystem)
;; output cleared
time-align-mobile.handlers> FileSystem/documentDirectory
;; output cleared
time-align-mobile.handlers> (.documentDirectory FileSystem)
;; output cleared
...
;; all result in an error like this
repl/invoke error, [TypeError: undefined is not an object (evaluating 'shadow.js.shim.module$expo_file_system.documentDirectory')]
@jgoodhcg I think your issue might just be doing (ns ...)
instead of (in-ns ...)
from the REPL

(it also might not, but if it’s actually shadow-cljs, I won’t know the answer)
Yeah, doing ns
clears out any aliases you might have set up. More exposition on that here https://stackoverflow.com/a/35713553/4284484
