This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-09-25
Channels
- # 100-days-of-code (3)
- # beginners (80)
- # cider (53)
- # cljdoc (9)
- # cljs-dev (66)
- # cljsrn (6)
- # clojure (108)
- # clojure-austin (5)
- # clojure-dusseldorf (1)
- # clojure-italy (9)
- # clojure-losangeles (2)
- # clojure-nl (4)
- # clojure-spec (40)
- # clojure-uk (46)
- # clojurescript (60)
- # cursive (119)
- # datomic (28)
- # emacs (10)
- # events (1)
- # figwheel-main (21)
- # fulcro (16)
- # hyperfiddle (10)
- # immutant (2)
- # leiningen (1)
- # liberator (5)
- # nyc (1)
- # off-topic (36)
- # onyx (4)
- # pedestal (52)
- # portkey (5)
- # re-frame (11)
- # reagent (11)
- # shadow-cljs (46)
- # sql (1)
- # unrepl (2)
@lilactown I pushed 2.6.10
which should fix this now. its a weird race condition but its behind a lock now so it should be ok.
@clashthebunny please grep for devcards
in your project. the file must come from somewhere
there is nothing devcards related in shadow-cljs itself so I have no clue where things are coming from
Sorry, I forgot to add that part.
deps.edn: devcards {:mvn/version "0.2.5"}
package.json: "devcards": "shadow-cljs watch devcards",
public/cards.html: <script>devcards.core_card.init();</script>
shadow-cljs.edn: :devcards {:target :browser
shadow-cljs.edn: {:entries [devcards.core_card]}}
shadow-cljs.edn: :dev {:compiler-options {:devcards true}}
src/cljs/devcards/core_card.cljs:(ns devcards.core_card
src/cljs/devcards/core_card.cljs: [devcards.core :as dc :refer [defcard defcard-rg deftest mkdn-pprint-str]]
src/cljs/devcards/core_card.cljs: [devcards.core :as dc]
src/cljs/devcards/core_card.cljs: [devcards.core-table :as table]
src/cljs/devcards/core_card.cljs: :filter (if (not-empty (get-in @devcards.core_card/card-state [:card :image-data]))
src/cljs/devcards/core_table.cljs:(ns devcards.core-table
src/cljs/devcards/core_table.cljs: [devcards.core :as dc :refer [defcard defcard-rg deftest mkdn-pprint-str]]
src/cljs/devcards/core_table.cljs: [devcards.core :as dc]
And here is shadow-cljs.edn:
{:deps true
:nrepl {:port 8230}
; :cache-blockers #{deck-builder.macros}
:open-file-command ["emacsclient" "-n" ["+%s:%s" :line :column] :file]
:builds {:browser
{:target :browser
:modules {:base {:entries [deck-builder.core]}}
:output-dir "public/js/compiled"
:asset-path "/js/compiled"
:devtools {:http-root "public"
:http-handler shadow.http.push-state/handle
:http-port 8280
:after-load deck-builder.core/mount-root
:preloads [devtools.preload]}}
:browser-test
{:target :browser-test
:test-dir "out/browser-test"
;; :compiler-options {:closure-defines {re-frame.trace.trace-enabled? true}}
:devtools {:http-root "out/browser-test"
:http-port 8290}}
:karma-test
{:target :karma
:output-to "out/karma/test.js"}
:devcards {:target :browser
:output-dir "public/js/compiled"
:asset-path "/js/compiled"
:modules
{:main
{:entries [devcards.core_card]}}
:dev {:compiler-options {:devcards true}}
;; :closure-defines {goog.DEBUG true}}}
;; day8.re-frame.tracing.trace-enabled? true}}}
:devtools
{:autoload true
;; :before-load app.core/before-load
;; :after-load app.core/after-load
;; :http-handler shadow.http.push-state/handle
;; :preloads [day8.re-frame-10x.preload]
:http-root "public"
:http-port 3449}}}}
what is the full ns form? I fixed a bug in the ns form that maybe that ns form slipped through?
Seems to be, and it's in my path:
~/c/deck-builder ❯❯❯ cat deps.edn master ✭ ✖ ✱ ◼
{:deps {re-frame {:mvn/version "0.10.5"}
day8.re-frame/re-frame-10x {:mvn/version "0.3.3-react16"}
binaryage/devtools {:mvn/version "0.9.10"}
proto-repl {:mvn/version "0.3.1"}
devcards {:mvn/version "0.2.5"}
cider/cider-nrepl {:mvn/version "0.18.0"}
refactor-nrepl {:mvn/version "2.4.0-SNAPSHOT"}
secretary {:mvn/version "1.2.3"}
venantius/accountant {:mvn/version "0.2.4"}
org.clojure/data.csv {:mvn/version "0.1.4"}
json-html {:mvn/version "0.4.4"}
io.joshmiller/exif-processor {:mvn/version "0.2.0"}
cljs-ajax {:mvn/version "0.7.4"}
camel-snake-kebab {:mvn/version "0.4.0"}
thheller/shadow-cljs {:mvn/version "2.6.10"}
com.bhauman/rebel-readline-cljs {:mvn/version "0.1.4"}}
:paths ["dev"
"test/cljs"
"src/clj"
"src/cljs"]
:aliases {:outdated {:extra-deps {olical/depot {:mvn/version "1.2.0"}}
:main-opts ["-m" "depot.outdated.main"]}}}
It's significant, sorry for the spam:
(ns devcards.core_card
(:require-macros
[devcards.core :as dc :refer [defcard defcard-rg deftest mkdn-pprint-str]]
[cljs.test :as t :include-macros true :refer-macros [testing is]]
[deck-builder.macros :as dm])
(:require
["rmwc/Select" :refer (Select)]
["rmwc/Grid" :refer (Grid GridCell)]
["rmwc/Chip" :refer (Chip
ChipText
ChipIcon
ChipSet)]
["rmwc/Card" :refer (Card
CardPrimaryAction
CardMedia
CardAction
CardActions
CardActionButtons
CardActionIcons)]
["rmwc/Drawer" :refer (Drawer DrawerHeader DrawerContent)]
["rmwc/TextField" :refer (TextField TextFieldIcon TextFieldHelperText)]
["rmwc/Fab" :refer (Fab)]
["rmwc/Radio" :refer (Radio)]
["rmwc/Button" :refer (Button ButtonIcon)]
["rmwc/List" :refer (ListItem ListItemText)]
["rmwc/Toolbar" :refer (Toolbar
ToolbarRow
ToolbarSection
ToolbarTitle
ToolbarMenuIcon
ToolbarFixedAdjust
ToolbarIcon)]
["rmwc/Shape" :refer (ShapeContainer)]
["rmwc/Typography" :refer (Typography)]
["rmwc/Icon" :refer (Icon)]
["rmwc/Elevation" :refer (Elevation)]
[json-html.core :refer (edn->html)]
[reagent.core :as r]
[ajax.core :as ajax]
[ajax.protocols :as protocols]
;; [re-frame.core :as rf]
;; [re-frame.db :refer [app-db]]
[devcards.core :as dc]
[devcards.core-table :as table]
[deck-builder.views :as v]
[deck-builder.core :as c]
[clojure.string :as str]))
although I wonder why you are not getting the correct error message to tell you this
I assume I just change it to the same as the devcards include.
just put [cljs.test :as t :refer [testing is]]
into your :require
not :require-macros
do me a favor and delete your .shadow-cljs/jar-manifests
directory and then start the server again as you did above
Much better error now:
[:devcards] Compiling ...
------ ERROR -------------------------------------------------------------------
File: /tank/rmason/code/deck-builder/src/cljs/devcards/core_table.cljs:1:1
--------------------------------------------------------------------------------
1 | (ns devcards.core-table
-------^------------------------------------------------------------------------
Invalid namespace declaration
-- Syntax error -------------------
(... ... (:require-macros
[devcards.core
:as
dc
:refer
[defcard defcard-rg deftest mkdn-pprint-str]]
[cljs.test :as t :include-macros true :refer-macros [testing is]]
[deck-builder.macros :as dm]) ...)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
has extra input
-- Relevant specs -------
:shadow.build.ns-form/ns-form:
(clojure.spec.alpha/cat
:ns
'#{clojure.core/ns}
:name
clojure.core/simple-symbol?
:docstring
(clojure.spec.alpha/? clojure.core/string?)
:meta
(clojure.spec.alpha/? clojure.core/map?)
:clauses
:shadow.build.ns-form/ns-clauses)
-------------------------
Detected 1 error
--------------------------------------------------------------------------------
2 | (:require-macros
3 | [devcards.core :as dc :refer [defcard defcard-rg deftest mkdn-pprint-str]]
4 | [cljs.test :as t :include-macros true :refer-macros [testing is]]
5 | [deck-builder.macros :as dm])
--------------------------------------------------------------------------------
:error
[1:0]~shadow.user=>
And it's from the old problem. The ns form doesn't contain that anymore.
I moved cljs.test down below. It's not in the :require-macros section anymore:
1 (ns devcards.core_card
2 (:require-macros
3 [devcards.core :as dc :refer [defcard defcard-rg deftest mkdn-pprint-str]]
4 [deck-builder.macros :as dm])
5 (:require
6 ["rmwc/Select" :refer (Select)]
7 ["rmwc/Grid" :refer (Grid GridCell)]
8 ["rmwc/Chip" :refer (Chip
9 ChipText
10 ChipIcon
11 ChipSet)]
12 ["rmwc/Card" :refer (Card
13 CardPrimaryAction
14 CardMedia
15 CardAction
16 CardActions
17 CardActionButtons
18 CardActionIcons)]
19 ["rmwc/Drawer" :refer (Drawer DrawerHeader DrawerContent)]
20 ["rmwc/TextField" :refer (TextField TextFieldIcon TextFieldHelperText)]
21 ["rmwc/Fab" :refer (Fab)]
22 ["rmwc/Radio" :refer (Radio)]
23 ["rmwc/Button" :refer (Button ButtonIcon)]
24 ["rmwc/List" :refer (ListItem ListItemText)]
25 ["rmwc/Toolbar" :refer (Toolbar
26 ToolbarRow
27 ToolbarSection
28 ToolbarTitle
29 ToolbarMenuIcon
30 ToolbarFixedAdjust
31 ToolbarIcon)]
32 ["rmwc/Shape" :refer (ShapeContainer)]
33 ["rmwc/Typography" :refer (Typography)]
34 ["rmwc/Icon" :refer (Icon)]
35 ["rmwc/Elevation" :refer (Elevation)]
36 [json-html.core :refer (edn->html)]
37 [reagent.core :as r]
38 [ajax.core :as ajax]
39 [ajax.protocols :as protocols]
40 ;; [re-frame.core :as rf]
41 ;; [re-frame.db :refer [app-db]]
42 [devcards.core :as dc]
43 [devcards.core-table :as table]
44 [deck-builder.views :as v]
45 [deck-builder.core :as c]
46 [clojure.string :as str]
47 [cljs.test :as t :refer [testing is]]))
Maybe a clean
or something is now required?
The above output is from a (shadow/once :devcards)
does it happen when you run shadow-cljs compile devcards
? ie. kill all running shadow-cljs instances and start fresh?
No, I figured it out. I had that refer-macros in core_table.cljs
also. Just too similar a name to pick it out of the error message.
So, I got the right message when core_table.cljs
was included in core_card.cljs
but not when the error was in core_card.cljs
which is what shadow-cljs.edn uses as it's entry point.
Yeah, it compiles now that I fixed both places.
[1:0]~shadow.user=> (shadow/once :devcards)
[:devcards] Compiling ...
npm package "fbjs" expected version "core-js@^1.0.0" but "2.5.7" is installed.
[:devcards] Build completed. (458 files, 28 compiled, 0 warnings, 163.04s)
:done
[1:0]~shadow.user=>
The full set of changes:
~/c/deck-builder ❯❯❯ git diff deps.edn shadow-cljs.edn src ⏎ master ✭ ✖ ✱ ◼
diff --git i/deps.edn w/deps.edn
index 10891a0..342b4ac 100644
--- i/deps.edn
+++ w/deps.edn
@@ -12,7 +12,7 @@
io.joshmiller/exif-processor {:mvn/version "0.2.0"}
cljs-ajax {:mvn/version "0.7.4"}
camel-snake-kebab {:mvn/version "0.4.0"}
- thheller/shadow-cljs {:mvn/version "2.5.1"}
+ thheller/shadow-cljs {:mvn/version "2.6.10"}
com.bhauman/rebel-readline-cljs {:mvn/version "0.1.4"}}
:paths ["dev"
diff --git i/src/cljs/devcards/core_card.cljs w/src/cljs/devcards/core_card.cljs
index 974362c..f322b04 100644
--- i/src/cljs/devcards/core_card.cljs
+++ w/src/cljs/devcards/core_card.cljs
@@ -1,7 +1,6 @@
(ns devcards.core_card
(:require-macros
[devcards.core :as dc :refer [defcard defcard-rg deftest mkdn-pprint-str]]
- [cljs.test :as t :include-macros true :refer-macros [testing is]]
[deck-builder.macros :as dm])
(:require
["rmwc/Select" :refer (Select)]
@@ -44,7 +43,8 @@
[devcards.core-table :as table]
[deck-builder.views :as v]
[deck-builder.core :as c]
- [clojure.string :as str]))
+ [clojure.string :as str]
+ [cljs.test :as t :refer [testing is]]))
(enable-console-print!)
diff --git i/src/cljs/devcards/core_table.cljs w/src/cljs/devcards/core_table.cljs
index 494687b..6046ea4 100644
--- i/src/cljs/devcards/core_table.cljs
+++ w/src/cljs/devcards/core_table.cljs
@@ -1,7 +1,6 @@
(ns devcards.core-table
(:require-macros
[devcards.core :as dc :refer [defcard defcard-rg deftest mkdn-pprint-str]]
- [cljs.test :as t :include-macros true :refer-macros [testing is]]
[deck-builder.macros :as dm])
(:require
["rmwc/Select" :refer (Select)]
@@ -45,7 +44,8 @@
[deck-builder.views :as v]
[deck-builder.core :as c]
[deck-builder.rules :as rls]
- [clojure.string :as str]))
+ [clojure.string :as str]
+ [cljs.test :as t :refer [testing is]]))
(def fake-player-data
(apply merge
I'm having an issue attempting to pull the graphiql npm module into a new library, [2018-09-25 15:49:47.466 - INFO] :shadow.build.npm/js-invalid-requires - {:resource-name "node_modules/graphql-language-service-interface/dist/GraphQLLanguageService.js", :requires [{:line 149, :column 30}]}
we're attempting to port to shadow-cljs from lein and wanted to use npm deps instead of clojars
@mattly when you say you want to use “npm deps” do you mean the :npm-deps
compiler flag or do you mean doing it the shadow-cljs way, where you install the library using npm
or yarn
and then require
it directly?