Fork me on GitHub

Say if one was writing a electron + cljs app. and once that app loads it reads a bunch of config from a cljs file not in the namespace like so :

(defn load-global-config
  ([] (load-file "~/.b42/init.cljs"))
  ([config-file] (load-file config-file)))
currently I am using shadow-cljs as a build tool and it gives an error goog.nodeGlobalRequire is not a function, is this an issue with shadow-cljs or cljs?

Dante T. M.03:01:36

Does it need to be outside the namespace? If so, it might make sense to compile it to JS (without using Closure's compilation renaming) and then reference the JavaScript file instead.


Hey so I’m trying to use re-natal per and everything goes well until its time to use figwheel. I get the below message and then it never connects and my REPL’s always time out when I try to start them in emacs. Any thoughts?

Davids-MacBook-Pro:bar-app Dave$ react-native run-ios --configuration Debug > /dev/null

The following commands produced analyzer issues:
	Analyze /Users/Dave/Projects/bar-app/node_modules/react-native/React/Base/ normal x86_64
	Analyze /Users/Dave/Projects/bar-app/node_modules/react-native/Libraries/Network/RCTNetInfo.m normal x86_64
(2 commands with analyzer issues)

Davids-MacBook-Pro:bar-app Dave$ re-natal use-figwheel
index.ios.js was regenerated was regenerated
Host in RCTWebSocketExecutor.m was updated
Dev server host for iOS: localhost
Dev server host for Android: localhost
Davids-MacBook-Pro:bar-app Dave$ lein figwheel ios
Figwheel: Cutting some fruit, just a sec ...
Figwheel: Validating the configuration found in project.clj
Figwheel: Configuration Valid ;)
Figwheel: Starting server at 
Figwheel: Watching build - ios
Figwheel: Cleaning build - ios
Compiling "target/ios/index.js" from ["src" "env/dev"]...
Successfully compiled "target/ios/index.js" in 20.006 seconds.
Launching ClojureScript REPL for build: ios
Figwheel Controls:
          (stop-autobuild)                ;; stops Figwheel autobuilder
          (start-autobuild [id ...])      ;; starts autobuilder focused on optional ids
          (switch-to-build id ...)        ;; switches autobuilder to different build
          (reset-autobuild)               ;; stops, cleans, and starts autobuilder
          (reload-config)                 ;; reloads build config and resets autobuild
          (build-once [id ...])           ;; builds source one time
          (clean-builds [id ..])          ;; deletes compiled cljs target files
          (print-config [id ...])         ;; prints out build configurations
          (fig-status)                    ;; displays current state of system
          (figwheel.client/set-autoload false)    ;; will turn autoloading off
          (figwheel.client/set-repl-pprint false) ;; will turn pretty printing off
  Switch REPL build focus:
          :cljs/quit                      ;; allows you to switch REPL to another build
    Docs: (doc function-name-here)
    Exit: Control+C or :cljs/quit
 Results: Stored in vars *1, *2, *3, *e holds last exception object
Prompt will show when Figwheel connects to your application


@dgonsalves22 #cljsrn channel might be of use for that question


@mfikes Thanks. Sorry I’m very new to all of this.