Comments (4)
What is the original issue/commit that fixed this? Also, is this a lein-cljsbuild specific issue? Lastly, can you restate the actual issue you're having here? It's not completely clear from your description above what is going wrong (including error messages is helpful).
from lein-cljsbuild.
yes. it is lein-cljsbuild specific.
I issued the command "lein cljsbuild once dev" to build all file under src/cljs directory and src/cljc directory.
Error Message:
Reloading Clojure file "atpco.record.rule.intlfare" failed.
clojure.lang.Compiler$CompilerException: java.lang.ExceptionInInitializerError, compiling:(atpco/record/intlfare.cljc:1:1)
Compiler.java:7526 clojure.lang.Compiler.load
RT.java:379 clojure.lang.RT.loadResourceScript
RT.java:370 clojure.lang.RT.loadResourceScript
RT.java:460 clojure.lang.RT.load
RT.java:426 clojure.lang.RT.load
core.clj:6046 clojure.core/load[fn]
core.clj:6045 clojure.core/load
core.clj:6029 clojure.core/load
RestFn.java:408 clojure.lang.RestFn.invoke
core.clj:5848 clojure.core/load-one
core.clj:5843 clojure.core/load-one
core.clj:5888 clojure.core/load-lib[fn]
core.clj:5887 clojure.core/load-lib
core.clj:5868 clojure.core/load-lib
RestFn.java:142 clojure.lang.RestFn.applyTo
core.clj:659 clojure.core/apply
core.clj:5925 clojure.core/load-libs
core.clj:5909 clojure.core/load-libs
RestFn.java:137 clojure.lang.RestFn.applyTo
core.clj:659 clojure.core/apply
core.clj:5947 clojure.core/require
.....
I think this issue is similar with #210.
During the build process, some clojure code is loading which cause this error message.
It seems to me the error is due to this reason:
even if I used reader conditional like
(ns atpco.record.intlfare
#?(:cljs (:require-macros [farefront.tools.core :as tools ]))
#?(:clj (:require [farecommon.tools.core :as tools])))
in .cljc file, the cljsbuild always trying to read farecommon.tools.core namespace, which is clojure code.
lein-cljsbuild should not trying to read that namespace. It only should read farefront.tools.core namespace.
Best regards
from lein-cljsbuild.
@JoshuaXX Would you mind setting up a minimal repo where this issue can be reproduced?
from lein-cljsbuild.
Hi,
I just rain into this issue myself. Please find attached a minimal test case (created using lein new luminus myapp +cljs
).
Essentially, it just:
- created a CLJ file (dummy.clj) with a single function (
dummy
) - tried to require this CLJ file from within a CLJC file (validation.cljc) using
(ns myapp.validation
(:require [struct.core :as st]
#?(:clj [myapp.dummy :as dummy])))
When invoking lein cljsbuild once
the error message is as fllows:
Compiling ["target/cljsbuild/public/js/app.js"] from ["src/cljs" "src/cljc" "env/dev/cljs"]...
WARNING: No such namespace: dummy, could not locate dummy.cljs, dummy.cljc, or JavaScript source providing "dummy" at line 7 src/cljc/myapp/validation.cljc
WARNING: Use of undeclared Var dummy/dummy-fn at line 7 src/cljc/myapp/validation.cljc
Everything eventually builds fine, however.
myapp.zip
from lein-cljsbuild.
Related Issues (20)
- Custom tagged literals cause build failure HOT 1
- Fails on Java 9? HOT 2
- :asset-path isn't documented HOT 1
- Circular dependencies : Warn user when a namespace requires itself HOT 2
- Adding 'monger' dependency breaks cljsbuild. HOT 2
- Possibility to add cli options to closure compiler. HOT 2
- Could not write JavaScript nil HOT 1
- Exception (...)/objectutil.js is not a relative path HOT 7
- Consider exposing :watch-fn compiler option? HOT 1
- :prep-tasks dont work when running `lein cljsbuild ...`
- Miraculously disappearing dependencies when using lein cljsbuild auto. HOT 2
- warning-handlers: clojure.lang.PersistentList cannot be cast to clojure.lang.IFn HOT 2
- Duplicate input error HOT 1
- Recompiling compiled app with different optimization type
- Simple example project does not compile HOT 1
- `lein trampoline cljsbuild repl-rhino` fails with jdk 11 HOT 1
- cljsbuild-example-simple didnt run with lein 2.9.5 and Java version > 11 & 15 HOT 1
- cljsbuild cannot find reagent HOT 1
- Fails with ClojureScript newer than 1.10.764 HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lein-cljsbuild.