我正在使用shadowcljs,并且尝试使用基于示例代码的代码在服务器上创建一个变异。我的变异很小,总是会引发此错误。为什么会这样?
.as-console {background-color:black !important; color:lime;}
.as-console-wrapper {max-height:100% !important; top:0;}
语法错误,宏扩展为(user.clj:47:1)的clojure.core / let。无- 失败:简单符号?在:[:bindings:form:local-symbol]规范: :clojure.core.specs.alpha / local-name nil-失败:向量?在: [:bindings:form:seq-destructure]规格: :clojure.core.specs.alpha / seq-binding-form nil-失败:地图?在: [:bindings:form:map-destructure]规格: :clojure.core.specs.alpha / map-bindings nil-失败:地图?在: [:bindings:form:map-destructure]规格: :clojure.core.specs.alpha / map-special-binding
第47行是[jchat.server-components.pathom-wrappers :refer [defmutation defresolver]]
(defmutation reset-users-db
"Removes all users"
[]
{::pc/output [:message]}
{:message "ok"})
的起始行。
使用defmutation
:
macroexpand
答案 0 :(得分:1)
感谢致癌物质帮助我调试和了解脱胶,我们发现该突变需要2个参数。
例如:
(defmutation reset-users-db
"Removes all users"
[env params]
{::pc/output [:message]}
(println "test"))