Fork me on GitHub
#shadow-cljs
<
2019-04-11
>
caleb.macdonaldblack07:04:01

I'm not sure what I'm doing wrong here. I'm trying to get the latest version of shadow-cljs running. I've replicated the issue in docker so I think I can rule out my local environment being misconfigured. It works with the previous version I was using which is 2.4.24. Here is a repo with a minimal configuration where I still get the issue: https://github.com/CalebMacdonaldBlack/shadow-cljs-issue-2.8.29

caleb.macdonaldblack07:04:28

Here is a stack trace of the issue I get

thheller07:04:45

that is a version conflict on the closure-compiler

thheller07:04:17

and a bad clojurescript version as well

thheller07:04:36

thats why I don't recommend using lein ...

caleb.macdonaldblack07:04:13

I'm using lein because I'm using cursive. What ide do you use?

thheller07:04:16

it should be clojurescript [org.clojure/clojurescript "1.10.520"]

thheller07:04:29

and

[com.google.javascript/closure-compiler-unshaded "v20190325"]
   [org.clojure/google-closure-library "0.0-20190213-2033d5d9"]

thheller07:04:37

I use Cursive.

thheller07:04:00

shadow-cljs pom and import pom.xml to create project

thheller07:04:24

you can use lein just fine ... just need to deal with the dependency conflicts yourself

caleb.macdonaldblack07:04:20

Okay that is really cool. I was only using lein because I didn't think there was any other way to resolve the project. But importing as a maven project with pom.xml worked perfectly. So I was able to remove project.clj and move deps to shadow-cljs.edn. I then removed clojure and clojurescript dependencies from the deps and I don't need the closure compiler stuff either.

caleb.macdonaldblack07:04:39

Also adding that stuff to lein worked as well

caleb.macdonaldblack07:04:10

but definitely better to ditch lein altogether

caleb.macdonaldblack07:04:23

@thheller What do you recommend for managing deps for a standard clojure project without cljs? Would I manually write a pom.xml to do this?

caleb.macdonaldblack07:04:34

Or perhaps continue using lein for clj projects?

thheller07:04:16

I use lein for everything that has CLJ things

thheller07:04:52

to make Cursive happy in CLJ+CLJS projects I add a dummy profile where I copy me cljs deps

thheller07:04:19

but don't actually use that profile and just use shadow-cljs.edn for the CLJS parts

thheller07:04:27

just need to make cursive aware of the extra deps somehow

thheller07:04:50

but I never run CLJS compiles through lein (other than the shadow-cljs project itself where I kinda have to)

caleb.macdonaldblack07:04:13

Okay thanks again. I really appreciate your help.

danieroux14:04:34

hi all, I'm stumped on getting a socket-repl running with shadow. :socket-repl {:port 9000} does not seem to be it.

thheller14:04:41

you can check the .shadow-cljs/socket-repl.port file to see the port the socket repl is opened on

thheller14:04:50

defaults to random but with that config it should be 9000

danieroux14:04:08

shadow-cljs node-repl app does not create that file, or open a socket repl. What am I missing?

danieroux14:04:35

(I am building a node app, not a browser one)

thheller14:04:54

node-repl does not take a build argument. it just starts a generic node repl.

thheller14:04:05

but it should start the socket-repl regardless

thheller14:04:18

does it say "connected to server" on startup?

thheller14:04:42

just tested on a fresh npx create-cljs-project foo-test cd foo-test configure :socket-repl {:port 9000} in shadow-cljs.edn and then npx shadow-cljs node-repl

thheller14:04:51

works fine and as expected

thheller14:04:52

(if you are going to connect remotely anyways you could use shadow-cljs server instead)

danieroux14:04:40

shadow-cljs server gives:

shadow-cljs - server version: 2.8.29 running at 
shadow-cljs - nREPL server started on port 59717

thheller14:04:18

ok. then your socket repl should be ready while that is running

thheller14:04:38

(and there should be a .shadow-cljs/socket-repl.port file to verify that)

danieroux14:04:24

Ah, got it now. I expected a "Socket Repl" message. And I had the socket-repl option on the :app level 😕

sakalli17:04:05

is there a getting started tutorial or sample conf for a basic node backend app to start playing around with limited clojure(script) knowledge? (using cider)

sakalli18:04:30

thanks @U3LP7DWPR will look at those!

lilactown20:04:58

using :chrome-extension, can I build a content script without it showing up in manifest.json?

lilactown20:04:27

I’m trying to inject it programmatically, but shadow-cljs plugs it into the manifest causing Chrome to complain it’s missing certain fields

thheller20:04:59

:chrome/content-inject not :chrome/content-script probably?

thheller20:04:46

or just :chrome/single-file