This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-01-25
Channels
- # announcements (6)
- # babashka (53)
- # beginners (199)
- # calva (101)
- # cider (8)
- # clara (17)
- # cljs-dev (1)
- # clojure (86)
- # clojure-australia (1)
- # clojure-dev (33)
- # clojure-europe (29)
- # clojure-france (13)
- # clojure-nl (6)
- # clojure-norway (7)
- # clojure-poland (3)
- # clojure-spec (2)
- # clojure-uk (9)
- # clojurescript (18)
- # community-development (2)
- # cursive (2)
- # datomic (8)
- # duct (43)
- # emacs (9)
- # events (6)
- # figwheel-main (1)
- # fulcro (7)
- # integrant (1)
- # jobs (1)
- # jobs-rus (1)
- # lambdaisland (1)
- # malli (19)
- # nrepl (2)
- # off-topic (31)
- # pathom (35)
- # quil (1)
- # reagent (4)
- # remote-jobs (7)
- # schema (1)
- # shadow-cljs (58)
- # spacemacs (6)
- # startup-in-a-month (12)
- # tools-deps (10)
- # xtdb (40)
Just the contents from a single startup, so close VS Code, delete the file/contents, then open the project that was giving the issue
Does anyone here use shadow-cljs with Windows and WSL2? If so, you may be able to help @roelof with this issue: https://github.com/BetterThanTomorrow/calva/issues/984
I'm using shadow-cljs with WSL2. I think he needs to specify source-paths in shadow-cljs.edn: {:source-paths ["src"] ,,, } The error isn't complaining about shadow-cljs not being installed. It's about not finding the src files, I think.
Hmm, perhaps you're right, but that's defined already, according to the linked repo in the issue
Is he accessing his project through the WSL extension of VSCode? In my setup, shadow-cljs, npm, etc., are all installed in Ubuntu/WSL2, not in Windows. Calva is installed as under the WSL:Ubuntu section of VSCode extensions. And everything just works.
You could try cloning this repository: https://github.com/agoldhammer/lexy I'm working with this right now on WSL2 with Calva. See if it gives you the same type of error.
same error @U2CR1J4UV
@brandon.ringe should I try to install node, npm and clojure-cljs on Windows ? What you asked on the issue
It's worth a try, node and shadow-cljs* I think you mean. It would allow us to maybe rule out the possibility that your system is trying to run it on windows and not wsl2
What happens if you run shadow-cljs compile app at the command line in your project directory?
@U2CR1J4UV what do you mean exacltly
I mean cd into your project directory and type “shadow-cljs compile app” at the prompt.
Then I see this :
shadow-cljs compile app
shadow-cljs - config: /home/roelof/learn-reagent-course-files/giggin/shadow-cljs.edn
[:app] Compiling ...
[:app] Build completed. (116 files, 0 compiled, 0 warnings, 5.12s)
does this look well
npm install --save-dev shadow-cljs
npm WARN saveError ENOENT: no such file or directory, open 'C:\Users\rwobb\package.json'
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN enoent ENOENT: no such file or directory, open 'C:\Users\rwobb\package.json'
npm WARN rwobb No description
npm WARN rwobb No repository field.
npm WARN rwobb No README data
npm WARN rwobb No license field.
+ [email protected]
added 99 packages from 106 contributors and audited 99 packages in 14.835s
3 packages are looking for funding
run `npm fund` for details
found 0 vulnerabilities
Ok, the good news is it works, and we know clojure-lsp is running shadow-cljs
on Windows and not WSL2. The bad news is I don't know why that's happening 😄
I don’t understand this at all. Clojure-lsp works fine on my setup, and I do not have shadow-cljs installed on Windows, only on Ubuntu/WSL2.
most wierd that I see now other repl as in other project but the same output as I did yarn run dev
so it looks that shadow-cljs has worked the whole time but then why can calva not find it
Clojure-lsp* rather, is where the call is made. And I'm not sure. I suppose we should wait and see if anyone else experiences the same thing. Let's leave the issue open
he, now I deleted the windows shadow-cljs I see this error when opening a repl
Start the REPL with the command *Start Project REPL and connect (aka Jack-in)*.
Default keybinding for REPL Jack-in: `ctrl+alt+c ctrl+alt+j`
Or connect to a running REPL using `ctrl+alt+c ctrl+alt+c`
Aborting. No valid shadow-cljs build selected.
Try clicking on the nrepl icon in the status bar. This will open a menu at the top listing a choic of builds from which you can select.
That is correct, since that’s the only build you have defined. What happens when you click OK on the right of that menu? Do you get a repl?
clj꞉shadow.user꞉> ; Use `alt+enter` to evaluate
; Creating cljs repl session...
; Connecting cljs repl: shadow-cljs...
OK, you’re in business. Now you can evaluate forms in your code by placing cursor in form and pressing Alt-Enter.
in the repl I see this :
; TIPS:
; - You can edit the contents here. Use it as a REPL if you like.
; - `alt+enter` evaluates the current top level form.
; - `ctrl+enter` evaluates the current form.
; - `alt+up` and `alt+down` traverse up and down the REPL command history
; when the cursor is after the last contents at the prompt
; - Clojure lines in stack traces are peekable and clickable.
clj꞉shadow.user꞉> ; Use `alt+enter` to evaluate
; Creating cljs repl session...
; Connecting cljs repl: shadow-cljs...
; The Calva Connection Log might have more connection progress information.
; Connected session: cljs, repl: :app
; TIPS: You can choose which REPL to use (clj or cljs):
; *Calva: Toggle REPL connection*
; (There is a button in the status bar for this)
; Jack-in done.
cljs꞉cljs.user꞉> ; Use `alt+enter` to evaluate
in the terminal output I see this :
npx shadow-cljs -d cider/cider-nrepl:0.25.7 watch :app
shadow-cljs - config: /home/roelof/learn-reagent-course-files/giggin/shadow-cljs.edn
shadow-cljs - HTTP server available at
shadow-cljs - server version: 2.11.14 running at
shadow-cljs - nREPL server started on port 3333
shadow-cljs - watching build :app
[:app] Configuring build.
[:app] Compiling ...
[:app] Build completed. (195 files, 0 compiled, 0 warnings, 5.51s)
That’s not the terminal window. That’s the output window. Click terminal in the bottom pane (or control-J if it’s not showing).
this one
npx shadow-cljs -d cider/cider-nrepl:0.25.7 watch :app
shadow-cljs - config: /home/roelof/learn-reagent-course-files/giggin/shadow-cljs.edn
shadow-cljs - HTTP server available at
shadow-cljs - server version: 2.11.14 running at
shadow-cljs - nREPL server started on port 3333
shadow-cljs - watching build :app
[:app] Configuring build.
[:app] Compiling ...
[:app] Build completed. (195 files, 0 compiled, 0 warnings, 5.51s)
That's it. So Calva has indeed found shadow-cljs, which compiled your code. There is no problem with finding shadow-cljs, as you see clearly in the terminal window.
yep, so still a wierd thing that I also see the message that shadow-cljs is not found. That is why i has made that issue
I can’t help with that. You will need one of the Calva devs. But it seems to me that that message has nothing to do with whether shadow-cljs or Calva is installed on Windows or WSL. It’s a problem with the classpath that clojure-lsp is using.
So, from the perspective of VS Code and Calva, shadow-cljs is found. However, it seems from the perspective of clojure-lsp, which runs as a separate process that Calva spawns, shadow-cljs is being run on Windows, where it's not found. I'm not sure why this is the case for you though and not @U2CR1J4UV
Maybe it’s got to do with the fact that he’s got shadow-cljs installed in a subdir of his home directory rather than in /usr/bin as on my system. I installed with npm -g. He seems to have used yarn.
https://github.com/clojure-lsp/clojure-lsp/issues/271 Also opened this issue to try to make this less of an issue