-
-
Notifications
You must be signed in to change notification settings - Fork 93
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
weird java compilation error when using :target :bundle #247
Comments
hmmm is there any way that you can get me a stacktrace? A couple of trouble shooting tips. Also, there is a different subtle problem, your But I could really use that stacktrace. |
You can also troubleshoot by removing |
Thanks for the prompt reply. My debugging shows that this is where the exception is being fired the output folder is not a problem yet, I'm not getting there. I tried removing the bundle command, changes nothing. I'll spend some time now trying to figure out why cljs is getting structure it does not seem to be expecting |
OK so that is in the CLJS compiler and it refers to how you are requiring an NPM library I think. So I'd look for the offensive require and then file a report or ask on slack on cljs-dev |
require in what part of the code/config? I for sure have react conflicts |
So it's not Figwheel that's causing this error. Which is good to hear :) |
Its somewhere in an ns where you use (:require [react-or-some-npm-lib]) to include an NPM library. |
You could just make a tiny cljs.main project and try to require each of the npm libraries you need. This will be helpful to learn what the pattern is. |
Wait, I see something. I see you're using :npm-deps that might be it. It may have something to do with figwheel. Hold on. |
Remove the |
It's probably best to use npm and your package.json directly |
Yes I think that is it. |
yes I see, what were the opts before they went through (add-implicit-opts opts) |
https://github.com/clojure/clojurescript/blob/master/src/main/clojure/cljs/closure.clj#L2508 :npm-deps doesn't work with :bundle target |
We should warn for that shit :) |
I think that's this is because |
I'm about to release 0.2.6 and along with some docs on how to use the new Bundle feature. |
First, thanks for the I read the article announcing :target :bundle and imagined it's some sort of next level npm integration, so kinda expected to get better UX for :npm-deps. Frankly, the consumption of npm modules by clojurescript has been pain in the butt since day one, and even though I got fairly proficient with the JS ecosystem by doing JS fullstack work for a while, it's still often very confusing to know what combination of options works in which context (fully aware that's in cljs's yard) so I'd love to see figwheel-main as one-stop-shop where I can start web project with minimal overture.
thanks a lot for the support! I normally try to stay away from slack |
Apparently there is another bug around this in CLJS, so thanks for helping find it. It seems that what you specified should have worked. |
clojurescript 1.10.773 fixes your issues |
Thanks, tested it (incl. several permutations I typically try when things are broken) and everything works as expected. Fells very luxurious :) I spent little time thinking and what surprises me is that I hit this bug first. This shows I'm using set-up that's not common and that's pretty big surprise (to me). I try not to be early adopter of build tools. Couple thoughts that may be useful, in random order:
I'd put some tutorial how to do this already to help the community if I felt confident I know what I'm doing but this is not how I feel yet. Btw this is indicative of the dev ex. Once again — not ranting or complaining. P.S. not to come across as rude rejecting to talk on slack — I prefer tickets to slack because they are indexed so someone with my problem would find solution easier. For this (and pretty much any serious work) slack is broken (to me). |
@gdanov I think most if this chalks up to the fact that the NPM integration is going down a better path now and I'm hoping these problems will be a thing of the past. |
Hi,
I have working project that targets browser. Due to one dependency that's not properly bundled (has
require()
in it) I decided to give the new :bundle target a go.Problem is, once I switch the target, I get the exception bellow very early in the start. I have disabled all the custom parts of the build I have, but still same exception.
here is the config as seen by figwheel:
The text was updated successfully, but these errors were encountered: