This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-06-07
Channels
- # aleph (5)
- # announcements (2)
- # babashka (17)
- # beginners (13)
- # cider (4)
- # clj-kondo (9)
- # cljdoc (18)
- # clojure (20)
- # clojure-art (7)
- # clojure-dev (11)
- # clojure-europe (20)
- # clojure-nl (2)
- # clojure-norway (53)
- # clojure-spec (30)
- # clojure-uk (4)
- # clojurescript (40)
- # datomic (70)
- # events (2)
- # graalvm-mobile (8)
- # gratitude (2)
- # guix (2)
- # honeysql (3)
- # hyperfiddle (10)
- # introduce-yourself (4)
- # jobs (2)
- # lsp (6)
- # luminus (3)
- # malli (5)
- # polylith (35)
- # practicalli (6)
- # re-frame (3)
- # reagent (9)
- # releases (1)
- # remote-jobs (20)
- # ring-swagger (2)
- # shadow-cljs (12)
- # sql (18)
- # xtdb (7)
How do you interpret this error, and what should I do about it? (see below)
What I see is that my package.json has the version mentioned in the error "highlight.js": "^9.12.0"
and the error is that it can't compare that to another version. but i dont' see where the 9.15.10 is coming from or understand why it's trying to compare to it.
I tried yarn clean bc who doesn't love a good clean yarn... not sure what else to try
[:failed-to-compare "^9.12.0" "9.15.10" #error {
:cause "Cannot invoke \"Object.getClass()\" because \"target\" is null"
:via
[{:type java.lang.NullPointerException
:message "Cannot invoke \"Object.getClass()\" because \"target\" is null"
:at [clojure.lang.Reflector invokeInstanceMethod "Reflector.java" 97]}]
:trace
[[clojure.lang.Reflector invokeInstanceMethod "Reflector.java" 97]
[shadow.cljs.devtools.server.npm_deps$make_engine invokeStatic "npm_deps.clj" 39]
[shadow.cljs.devtools.server.npm_deps$make_engine invoke "npm_deps.clj" 32]
[shadow.cljs.devtools.server.npm_deps$fn__16957$fn__16958 invoke "npm_deps.clj" 46]
[clojure.lang.Delay deref "Delay.java" 42]
[clojure.core$deref invokeStatic "core.clj" 2337]
[clojure.core$deref invoke "core.clj" 2323]
[shadow.cljs.devtools.server.npm_deps$fn__16957$fn__16960 invoke "npm_deps.clj" 52]
[shadow.cljs.devtools.server.npm_deps$is_installed_QMARK_ invokeStatic "npm_deps.clj" 207]
[shadow.cljs.devtools.server.npm_deps$is_installed_QMARK_ invoke "npm_deps.clj" 201]
[shadow.cljs.devtools.server.npm_deps$main$fn__17046 invoke "npm_deps.clj" 223]
[clojure.core$complement$fn__5737 invoke "core.clj" 1455]
[clojure.core$filter$fn__5962 invoke "core.clj" 2838]
[clojure.lang.LazySeq sval "LazySeq.java" 42]
[clojure.lang.LazySeq seq "LazySeq.java" 51]
[clojure.lang.RT seq "RT.java" 535]
[clojure.core$seq__5467 invokeStatic "core.clj" 139]
[clojure.core$seq__5467 invoke "core.clj" 139]
[shadow.cljs.devtools.server.npm_deps$main invokeStatic "npm_deps.clj" 225]
[shadow.cljs.devtools.server.npm_deps$main invoke "npm_deps.clj" 216]
[shadow.cljs.devtools.cli$main invokeStatic "cli.clj" 143]
[shadow.cljs.devtools.cli$main doInvoke "cli.clj" 134]
[clojure.lang.RestFn applyTo "RestFn.java" 137]
[clojure.core$apply invokeStatic "core.clj" 671]
[clojure.core$apply invoke "core.clj" 662]
[shadow.cljs.devtools.cli$_main invokeStatic "cli.clj" 221]
[shadow.cljs.devtools.cli$_main doInvoke "cli.clj" 219]
[clojure.lang.RestFn applyTo "RestFn.java" 137]
[clojure.lang.Var applyTo "Var.java" 705]
[clojure.core$apply invokeStatic "core.clj" 667]
[clojure.main$main_opt invokeStatic "main.clj" 514]
[clojure.main$main_opt invoke "main.clj" 510]
[clojure.main$main invokeStatic "main.clj" 664]
[clojure.main$main doInvoke "main.clj" 616]
[clojure.lang.RestFn applyTo "RestFn.java" 137]
[clojure.lang.Var applyTo "Var.java" 705]
[clojure.main main "main.java" 40]]}]
Here is my shadow info
➜ centriq-immobile git:(staging) ✗ npx shadow-cljs info
shadow-cljs - config: /home/drewverlee/centriq/centriq-immobile/shadow-cljs.edn cli version: 2.8.67 node: v12.3.1
=== Version
jar: 2.8.67
cli: 2.8.67
deps: 1.3.1
config-version: 2.8.67
=== Paths
cli: /home/drewverlee/centriq/centriq-immobile/node_modules/shadow-cljs/cli/dist/shadow.cljs.npm.cli.js
config: /home/drewverlee/centriq/centriq-immobile/shadow-cljs.edn
project: /home/drewverlee/centriq/centriq-immobile
cache: .shadow-cljs
=== Java
openjdk version "17.0.7" 2023-04-18
OpenJDK Runtime Environment (build 17.0.7+7-Ubuntu-0ubuntu122.04.2)
OpenJDK 64-Bit Server VM (build 17.0.7+7-Ubuntu-0ubuntu122.04.2, mixed mode, sharing)
=== Source Paths
(I'm trying to update, but there some minor blockers)
There is a remark that this "kind" of error is fixed in 2.8.5
but were past that.:target :browser
there is also this within the build that i haven't had time to parse:
:js-options {:variable-renaming :local
:resolve {"cross-fetch/polyfill" {:target :npm
:require "unfetch"}}}
Heres a remark that the error is best fixed by updating shadow-cljs
fair enough
Quick question (first post!) … with this example shadow-cljs.edn config:-
{:lein true
:nrepl {:port 8888}
:cache-root "/tmp/.shadow-cljs"
:builds {:my-target {:target :node-library
:output-to "../some/folder/index.js"
:exports {:my-export-1 ns/fn-1
:my-export-2 ns/fn-2}
:compiler-options {:infer-externs :auto}
:release {}}}}
I can’t quite work out why my exports are being renamed, in that the dashes are being renamed to underscores i.e., my-export-1 is being renamed to my_export_1 etc.
It’s not a biggie, but just curious as to what might be doing it as shadow isn’t meant to change these?exports need to follow JS conventions, so my-export-1
would be my
minus export
minus 1
in JS and not a valid identifier
they are "munged" as to avoid generating invalid code. I guess it could throw instead but there are not -
in JS identifiers, so it is doing what is needed