Questions tagged [shadow-cljs]

shadow-cljs is a tool that facilitates compiling your ClojureScript code for different targets

Resources

90 questions
7
votes
2 answers

How to connect a ClojureScript node REPL to my :node-library shadow-cljs project?

Context I am building a Node.js library with ClojureScript and shadow-cljs. All development is done with ClojureScript but the build artefact is a NPM package. Example: (ns com.example.answer) (defn answer [] 42) build... release... then const…
customcommander
  • 17,580
  • 5
  • 58
  • 84
7
votes
1 answer

How to load css files in ClojureScript project with shadow-cljs

I have a styles.css file and I need to load it from a cljs to pass it as a props to a react lib. The import in node is: import styles from './styles.css' Is it possible to do this in ClojureScript with shadow-cljs?
ivangalbans
  • 470
  • 5
  • 14
6
votes
2 answers

shadow-cljs - socket connect failed, server process dead?

I'm using shadow-cljs in a ClojureScript project. When I do shadow-cljs watch app the console log the error shadow-cljs - socket connect failed, server process dead?. I restarted my computer but the error still What can I do to fix this problem?
ivangalbans
  • 470
  • 5
  • 14
5
votes
2 answers

Reagent configuration for multi-page applications

My project.clj has, :cljsbuild {:builds {:app {:source-paths ["src/cljs" "src/cljc"] :compiler {:output-to "target/cljsbuild/public/js/app.js" :output-dir…
Adeel Ansari
  • 39,541
  • 12
  • 93
  • 133
4
votes
1 answer

Import react-table into ClojureScript with Shadow-CLJS

Web development newbie here. I'm trying to use the NPM react-table package with a ClojureScript/Reagent project. I'm failing to import the package properly. What I've done: 1/installed react-table through NPM, it's in my project directory 2/in my…
3
votes
1 answer

Often seeing "REPL command timed out" in Cider with shadow-cljs and React Native. Must restart emulator to fix

I'm working with a basic ReactNative app using Emacs with Cider and ShadowCLJS. I can develop with the REPL pretty consistently but as soon as I accidentally save a file that has a syntax error in it then I lose communication to the REPL. Anything I…
Eric Ihli
  • 1,722
  • 18
  • 30
2
votes
1 answer

While using shadow-cljs to watch the app, when should I refresh the browser to see the changes? What about hard refreshing and rebuilding?

I have been using Clojure, ClojureScript, lein, shadow-cljs, Emacs, and CIDER to work on a Clojure/ClojureScript dynamic web app project. Usually, I build the project by executing the command cider-jack-in-cljs in Emacs, choosing shadow-cljs, then…
Pedro Delfino
  • 2,421
  • 1
  • 15
  • 30
2
votes
1 answer

Although CIDER works without projects and the Clojure project is successfully built, why I can't bring both things together?

I have a Clojure/ClojureScript project that I am able to build locally. The project is built with the following command: Pedros-MacBook-Air:balance pedro$ shadow-cljs watch app shadow-cljs - config:…
Pedro Delfino
  • 2,421
  • 1
  • 15
  • 30
2
votes
1 answer

How to use Reanimated "worklet" directive in ClojureScript?

I am trying to use the react-native-reanimated library in the clojurescript project. And for this library, I have to create worklets by adding the "worklet" directive at the top. ex: function someWorklet(greeting) { 'worklet'; console.log("Hey…
2
votes
2 answers

how to rerender reagent ui with react 18 and shadow-cljs reload?

how to rerender the whole reagent tree when we save file and shadow-cljs reloads? react 18 has new createRoot api and even before - if nothing changed calling render has no effect
2
votes
2 answers

The required JS dependency "readable-stream/writable.js" is not available, it was required by "node_modules/stream-browserify/index.js"

I am getting this error when trying to build a Clojurescript project with shadow-cljs. I've tried looking for syntax errors as described here but I can get the same the error with a single line and a single import although not all imports cause the…
ruhan
  • 35
  • 5
2
votes
0 answers

TypeError: $jscomp$generator$this.send is not a function

I'm trying to use @walletconnect/web3-provider package from npm in ClojureScript, and when I call a function I get an error: TypeError: $jscomp$generator$this.send is not a function Here is JavaScript code which is used, the problem is in 4th line:…
Liza
  • 59
  • 6
2
votes
1 answer

I use goog.structs.LinkedMap to implement the cljs.core/IFn protocol, but I can’t use the function form to call an instance of LinkedMap

here is my code,running on shadow-cljs. (ns app.main (:require [goog.structs.LinkedMap])) (extend-type goog.structs.LinkedMap cljs.core/IFn (-invoke ([m k] (.get m k nil)) ([m k not-found] (.get m k not-found)))) (def m…
kin devin
  • 23
  • 3
2
votes
1 answer

How do I setup shadow-cljs for code reload with Cordova + Clojurescript?

I am currently working on a sample app on Cordova with Clojurescript. I am using shadow-cljs to build the project but somehow I could not find a way to make the code reload to work. Instead, I have to use the browser build when developing since it…
kaffein
  • 1,766
  • 2
  • 28
  • 54
2
votes
1 answer

No application has connected to the REPL server

I am trying to evaluate some Clojure forms in VS Code using the Calva REPL. When I run any of these commands, I get the error: No application has connected to the REPL server. Make sure your JS environment has loaded your compiled ClojureScript…
1
2 3 4 5 6