Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Jack-in error when choosing Clojure CLI + shadow-cljs project type #675

Closed
bpringe opened this issue Jun 23, 2020 · 1 comment
Closed

Jack-in error when choosing Clojure CLI + shadow-cljs project type #675

bpringe opened this issue Jun 23, 2020 · 1 comment
Labels
bug Something isn't working

Comments

@bpringe
Copy link
Member

bpringe commented Jun 23, 2020

I'm new to shadow-cljs so maybe I'm doing something odd, but you can repro with this repo: https://github.com/bpringe/auth-template

  1. Open the project directory
  2. Run Jack-in
  3. Select Clojure CLI + shadow-cljs as project type

This is the terminal output plus the error:

> Executing task: clojure -Sdeps '{:deps {nrepl {:mvn/version "0.6.0"} cider/cider-nrepl {:mvn/version "0.23.0"} clj-kondo {:mvn/version "2020.04.05"}}}' -A:dev -m nrepl.cmdline --middleware "[cider.nrepl/cider-middleware cider.piggieback/wrap-cljs-repl]" <

Execution error (FileNotFoundException) at nrepl.cmdline/require-and-resolve (cmdline.clj:185).
Could not locate cider/piggieback__init.class, cider/piggieback.clj or cider/piggieback.cljc on classpath.

Full report at:
/tmp/clojure-5741222363451437406.edn
The terminal process terminated with exit code: 1

Terminal will be reused by tasks, press any key to close it.
@bpringe
Copy link
Member Author

bpringe commented Jun 23, 2020

Maybe that project type is for when you're running shadow-cljs from tools.deps? https://shadow-cljs.github.io/docs/UsersGuide.html#deps-edn - meaning shadow is configured in deps.edn and not shadow-cljs.edn and is run from the clojure cli.

Currently my workflow with the type of project I linked is:

  1. Jack-in via the Clojure CLI project type
  2. Start my clj server that serves my app's backend service and the page that hosts the js built by shadow-cljs
  3. In a new terminal, run shadow-cljs watch app

If I want to connect calva to the cljs repl I run Connect to a running repl server in the project and select shadow-cljs - this then makes my calva repl the cljs repl and if I want to go back to the clj repl I have to run the connect command again and connect back to that repl.

I guess what I'm wondering is am I doing something inefficient here? I'm guessing if I run shadow from the clojure cli (adding it to deps.edn), I can perhaps use the Clojure CLI + shadow-cljs project type at jack-in, and maybe the watch process will start, reducing an extra step/terminal. I do see in the docs that using the shadow-cljs command instead is recommended though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant