Fork me on GitHub

"No modules containing clojure.main" <- I used to be able to create a local REPL easily but now get this. Is there a solution?


If I go to the project structure I can see that there's a module there. But I can't select it when trying to create a local REPL configuration.


Perhaps there's something I need to change in the project.clj?


I registered the lein project, which I thought might help. However the suggested stub generation crashes.


I invalidated caches and restarted, but still get the stub generation crashing. The exact message is "Error generating stubs for module demo".


does anyone here use Cursive with CLJS+Figwheel+Reagent? if yes, howz your experience been? maybe @timothypratley ?


@cjmurphy So, two problems - the modules containing clojure.main issue is usually when you’re trying to use a module that doesn’t have Clojure itself as a dependency.


Could you check that?


The stub problem would hopefully be fixed in the dev build, see:


@moizsj Yes, I used that when building the licence renewal page.


It worked nicely!


I didn’t often bother with a REPL, but figwheel was great.


good to know Colin! @cfleming


@cfleming: The first issue ("No modules containing clojure.main") fixed itself when I registered the lein project, as was suggested when I looked at the project.clj file. I'm going off an Untangled project, so the dependencies from project.clj should all be fine. Untangled developers all use IDEA/Cursive, so it should be pretty quick to get any project going. Perhaps the generating stubs problem is from more recent Cursives, and they are all on an older version.


@cfleming: 'Figwheel configuration error' that 'The required key :cljsbuild is missing'. But :cljsbuild is there in the project.clj <-- that's why the stubs are not generated - I can see from the log. So perhaps not a Cursive problem really.


Actually it all seems to be fine just using lein from the command line, so perhaps it is a Cursive problem after all.


@moizsj it works great 🙂 Having arity checking etc in Cursive is very helpful, and navigation etc work well.


@cjmurphy Did you try the dev build for the :cljsbuild problem?


@cjmurphy Actually @wilkerlucio had the same problem. I believe it’s fixed now in the dev build, but Slack has eaten the discussion I had with him around it. Let me know if that doesn’t fix the problem.


@cfleming: My particular problem was known by Untangled folks. This was the bad line: (def figwheel-config (fig/fetch-config)). Doing too much in a def, and building the stubs causes the defs to be run.


@moizsj I'm using Cursive + Figwheel + Reagent daily, and it works quite well!


@cjmurphy Ahhhh.... I remember now 🙂


I'm working with an IDEA project that has many project.clj within it. I know how to get the IDE to ask me to register a particular project.clj. After it has done that everything seems to be concentrated on that project.clj. Is there an easy way to unregister a project.clj? That way I will be able to switch between working with different project.clj.


I've realised you can register many. And that this IDEA project has many project.cljs with the same name! Them having the same name seems to stuff Cursive about so I can fix that...


@cjmurphy Hmm, why do your projects all have the same name?


I’m not sure how well Cursive would handle that - by name I guess you mean the lein artifact name?


I'm just going off an existing IDEA project i.e. not one I created. But am fixing it now.


You can definitely create a project with multiple lein projects, see: under “Working with multi-module projects"


defproject untangled/demo "1.0.0" <-- they all (actually most) say demo, but I'm changing them.


I see. I think that should work, but I’m not sure I’ve ever tested it.


Its a 'cookbook' - so lots of separate project.clj files. I'll fix then see if I can work with one, then another. Thanks for the doc reference.