This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-08-28
Channels
- # announcements (2)
- # babashka (36)
- # beginners (29)
- # bristol-clojurians (2)
- # calva (3)
- # cider (102)
- # circleci (7)
- # clj-kondo (5)
- # cljs-dev (7)
- # clojure (117)
- # clojure-europe (23)
- # clojure-korea (1)
- # clojure-nl (1)
- # clojure-spec (15)
- # clojure-uk (47)
- # clojurescript (43)
- # code-reviews (1)
- # community-development (1)
- # conjure (32)
- # cursive (1)
- # datalog (15)
- # datomic (14)
- # emacs (18)
- # fulcro (9)
- # helix (23)
- # jackdaw (1)
- # jobs-discuss (10)
- # meander (8)
- # membrane (57)
- # off-topic (4)
- # portal (2)
- # re-frame (22)
- # reagent (1)
- # reitit (9)
- # reveal (3)
- # rewrite-clj (14)
- # shadow-cljs (22)
- # spacemacs (27)
- # sql (34)
- # testing (6)
- # tools-deps (40)
- # vim (5)
- # vrac (15)
- # xtdb (2)
I’ve started getting this error on a project I had shadow working on. Not sure what changed.
hadow-cljs - starting via "clojure"
[2020-08-28 19:15:35.245 - WARNING] :shadow.cljs.devtools.server/nrepl-ex
Note: The following stack trace applies to the reader or compiler, your code was not executed.
CompilerException Unexpected error macroexpanding if-ns at (cider/piggieback.clj:22:1). #:clojure.error{:phase :macroexpansion, :line 22, :column 1, :source "cider/piggieback.clj", :symbol if-ns}
clojure.lang.Compiler.macroexpand1 (Compiler.java:7019)
clojure.lang.Compiler.macroexpand (Compiler.java:7075)
clojure.lang.Compiler.eval (Compiler.java:7161)
clojure.lang.Compiler.load (Compiler.java:7636)
clojure.lang.RT.loadResourceScript (RT.java:381)
clojure.lang.RT.loadResourceScript (RT.java:372)
clojure.lang.RT.load (RT.java:459)
clojure.lang.RT.load (RT.java:424)
clojure.core/load/fn--6839 (core.clj:6126)
clojure.core/load (core.clj:6125)
clojure.core/load (core.clj:6109)
clojure.core/load-one (core.clj:5908)
Caused by:
NoSuchFieldError ES3
cljs.closure__init.load (:133)
cljs.closure__init.<clinit> (:-1)
java.lang.Class.forName0 (Class.java:-2)
java.lang.Class.forName (Class.java:427)
clojure.lang.RT.classForName (RT.java:2211)
clojure.lang.RT.classForName (RT.java:2220)
clojure.lang.RT.loadClassForName (RT.java:2239)
clojure.lang.RT.load (RT.java:449)
clojure.lang.RT.load (RT.java:424)
clojure.core/load/fn--6839 (core.clj:6126)
clojure.core/load (core.clj:6125)
clojure.core/load (core.clj:6109)
shadow-cljs - HTTP server available at
shadow-cljs - server version: 2.10.21 running at
shadow-cljs - watching build :app
[:app] Configuring build.
[:app] Compiling ...
[2020-08-28 19:15:45.805 - WARNING] :shadow.cljs.devtools.server.util/handle-ex - {:msg {:type :start-autobuild}}
NoClassDefFoundError Could not initialize class cljs.repl__init
java.lang.Class.forName0 (Class.java:-2)
java.lang.Class.forName (Class.java:427)
clojure.lang.RT.classForName (RT.java:2211)
clojure.lang.RT.classForName (RT.java:2220)
clojure.lang.RT.loadClassForName (RT.java:2239)
clojure.lang.RT.load (RT.java:449)
clojure.lang.RT.load (RT.java:424)
clojure.core/load/fn--6839 (core.clj:6126)
clojure.core/load (core.clj:6125)
clojure.core/load (core.clj:6109)
clojure.core/load-one (core.clj:5908)
clojure.core/load-one (core.clj:5903)
Actually seems like I bumped up against this before. It’s when I use :deps {:aliases [:cljs]}
instead of :dependencies
which I was avoiding for duplication reasons
its just a version conflict you need to resolve. see https://shadow-cljs.github.io/docs/UsersGuide.html#failed-to-load
Hello friends. I am completely stumped. I have a typescript npm pkg that I’m building that includes a set of components. One of these components is named DatePicker. Under the covers it uses https://github.com/Hacker0x01/react-datepicker.
On the clojurescript side, I do a (:require ["@foo/bar" :as bar])
and then do [:> bar/DatePicker …]
The error I get is: Uncaught Error: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.
Looking at the react-datepicker issues, I came across: https://github.com/Hacker0x01/react-datepicker/issues/1333 but changing my tsx code to point at ReactDatePicker.default doesn’t seem to do the trick either.
What I have verified is that I can indeed use react-datepicker
directly, but not when it’s nested in a component from another package.
I don’t know if this is a shadow-cljs question or not, but I am quite confused and any help would be appreciated.
on the TS side, the component file looks roughly like:
import * as React from 'react';
import ReactDatePicker from 'react-datepicker';
export interface DatePickerProps {
...
}
export const DatePicker = (props: DatePickerProps) => {
...
return (
<div>
<ReactDatePicker
...
/>
</div>
);
};
hey there, two quick questions:
1. I’ve got a :node-script
target with :compiler-options {:hashbang false}
yet a shebang still seems to be getting inserted at the beginning of my compiled file. any idea what might be causing that? I’m on 2.11.1
2. is there a way to inline generated source maps as opposed to keeping them in separate files?
@mss :hashbang false
is directly in the build config, not inside :compiler-options
@thheller anything to add there? The trouble seems to be with the ReactDatePicker, not my component that wraps it.
> Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined.
is telling you that when using [:> Thing ...]
Thing
was undefined. so you said bar/DatePicker
which probably meant bar/DatePicker
is undefined