How to Declare Namespace?

I’m (attempting) to build an app with shadow-cljs. Currently, I get the following error, any ideas on the cause and possible solution? Thanks.

Error in phase :compilation
Invalid namespace declaration
– Syntax error -------------------

(… … (:require
[recipes.components :as components]
[metosin/reitit.core :as reitit]
[reagent.core :as reagent]
[re-frame.core :as re-frame]) …)

has extra input

The complete declaration follows:

(ns recipes.core
  (:require []
            [recipes.components :as components]
            [metosin/reitit.core :as reitit]
            [reagent.core :as reagent]
            [re-frame.core :as re-frame])
  (:import [goog.history EventType Html5History]))

I’ve structured the app as follows:

| shadow-cljs.edn
| src/
  | recipes/
    | core.cljs



 [[cider/cider-nrepl "0.22.4"]
  [reagent "0.8.1"]
  [re-frame "0.10.9"]
  [ "v0.2.0"]
  [metosin/reitit "0.3.10"]]

 {:port 3333}

 :dev-http {8080
            {:root "public"}}

 {:app {:target :browser
        :output-dir "public/js"
        :asset-path "/js"
        :modules {:recipes {:init-fn recipes.core/run}}}}}

It should be reitit.core without metosin/.

The error message is a bit weird but it is confused by the qualified symbol which is invalid.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.