Fork me on GitHub
#cursive
<
2021-03-23
>
sb13:03:51

I have a prep task `

"yarn-install" ["shell" "yarn" "install"]
in the project.clj.. with
[lein-shell "0.5.0"]
but that isn’t run as in repl.. try to find packages.json from root.. (if I understand good) any idea how to fix it?

sb13:03:12

.IOException: Cannot run program "yarn" (in directory "/"): error=2, No such file or directory at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1128) at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1071) at java.base/java.lang.Runtime.exec(Runtime.java:592) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at clojure.lang.Reflector.invokeMatchingMethod(Reflector.java:167) at clojure.lang.Reflector.invokeInstanceMethod(Reflector.java:102)

cfleming07:03:53

The problem here is that the CWD of the IntelliJ process is not the same as when running lein from the command line. You’d probably need a way to help shell to find the yarn command since the path will probably be wrong, and also a way to specify to yarn which directory it should install in - I don’t know if that’s possible.

👍 3
sb09:03:12

Ok, thank you!

sb13:03:39

I understand I can add in Cursive setup at “Before launch” NPM script (install). My question is, is that possible run the original project.clj w/ lein shell?

denik21:03:09

@cfleming could cursive get a tap> UI? I’ve been falling back on shadow-cljs inspect but some of my projects don’t require CLJS, even http so it feels a little extra

cfleming23:03:06

You mean like a data inspector?

thheller09:03:46

yeah its a data inspector

caleb.macdonaldblack23:03:31

Any idea why a second double quote is not being automatically inserted when editing a CLJS file in parinfer mode?

Azzurite23:03:49

There is no difference for me between CLJ and CLJS, both work and insert a second " when I type only one

Azzurite23:03:15

Maybe check the "Editor->General->Smart Keys" section in the intellij settings

caleb.macdonaldblack05:03:35

Smart keys in the editor looks fine. It’s something that has come and gone periodically. It will go for months not working, then suddenly work, then not working again. It’s very odd

cfleming08:03:10

I’ve never experienced this, and while I don’t do it a lot I do edit CLJS from time to time, always using parinfer.

cfleming08:03:50

I’m not sure what to try, I’ll have a look at the code tomorrow to see if there’s anything I can think of.

eraserhd16:03:08

Parinfer shouldn't be doing anything, AFAIK. When quotes are unbalanced, parinfer will leave the file untouched until the user fixes quotes.

caleb.macdonaldblack23:03:41

CLJ files in parinfer mode work.

caleb.macdonaldblack23:03:58

Also a CLJS file in paredit or structural off works too

caleb.macdonaldblack23:03:07

It’s just CLJS with parinfer causing issues

caleb.macdonaldblack23:03:28

This is frustrating because as soon as brackets or quotes are mismatched in parinfer, there is heaps for lag in the editor. So if type one quote, I’m lagging until I close it. So I have to type to quotes and then move my cursor back one space to be inside the quotes.