Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

boot dev run cannot find my.example.spa #1

Open
runswithd6s opened this issue Mar 15, 2019 · 1 comment
Open

boot dev run cannot find my.example.spa #1

runswithd6s opened this issue Mar 15, 2019 · 1 comment

Comments

@runswithd6s
Copy link

runswithd6s commented Mar 15, 2019

In using this template with the prescribed instructions:
boot -d boot/new new -t boot-reframe-10x -n my.example.spa

The resulting application is is unable to find the my.example.spa namespace to run core/main.

~/workspaces/clojure $ boot -d boot/new new -t boot-reframe-10x -n my.example.spa
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
Retrieving maven-metadata.xml from https://repo.clojars.org/
Retrieving maven-metadata.xml from https://repo.clojars.org/
Generating new project named 'my.example.spa'
~/workspaces/clojure $ cd my.example.spa/
~/workspaces/clojure/my.example.spa $ ls
CHANGELOG.adoc  LICENSE  README.adoc  build.boot  resources  src  test
~/workspaces/clojure/my.example.spa $ boot dev
Retrieving maven-metadata.xml from https://repo.clojars.org/
Retrieving maven-metadata.xml from https://repo.clojars.org/
Writing boot_cljs_repl.cljs...
Starting reload server on ws://localhost:39747
2019-03-15 14:20:25.721:INFO::clojure-agent-send-off-pool-0: Logging initialized @9246ms
2019-03-15 14:20:25.769:INFO:oejs.Server:clojure-agent-send-off-pool-0: jetty-9.2.10.v20150310
2019-03-15 14:20:25.793:INFO:oejs.ServerConnector:clojure-agent-send-off-pool-0: Started ServerConnector@6e532dcf{HTTP/1.1}{0.0.0.0:3000}
2019-03-15 14:20:25.794:INFO:oejs.Server:clojure-agent-send-off-pool-0: Started @9319ms
Started Jetty on http://localhost:3000

Starting file watcher (CTRL-C to quit)...

[WARNING] No nREPL middleware descriptor in metadata of #'cemerick.piggieback/wrap-cljs-repl, see nrepl.middleware/set-descriptor!
nREPL server started on port 9090 on host 127.0.0.1 - nrepl://127.0.0.1:9090
Adding :require adzerk.boot-cljs-repl to client.cljs.edn...
Writing adzerk/boot_reload/public$/js/client.cljs to connect to ws://localhost:39747...
Adding :require adzerk.boot-reload.public$.js.client to public/js/client.cljs.edn...
Compiling ClojureScript...
• public/js/client.js
No such namespace: my.example.spa, could not locate my/example/spa.cljs, my/example/spa.cljc, or JavaScript source providing "my.example.spa" in file adzerk/boot_reload/public$/js/client.cljs
Elapsed time: 21.806 sec

The files exist, however:

src/
src/cljs
src/cljs/my
src/cljs/my/example
src/cljs/my/example/spa
src/cljs/my/example/spa/events.cljs
src/cljs/my/example/spa/subs.cljs
src/cljs/my/example/spa/core.cljs
src/cljs/my/example/spa/views.cljs
src/cljs/my/example/spa/db.cljs

NOTE: When running this same template without using java namespace conventions, it will work:

boot -d boot/new new -t boot-reframe-10x -n myexamplespa

@runswithd6s
Copy link
Author

Comparing the two projects reveals the issue:

 (deftask development []
   (task-options! cljs {:optimizations :none}
-                 reload {:on-jsload 'my.example.spa/main})
+                 reload {:on-jsload 'myexamplespa.core/main})
   identity)

build.boot is not referencing the full path to core for the Java-style namespaced project.

@runswithd6s runswithd6s changed the title TODO Application cannot find my.example.spa boot dev run cannot find my.example.spa Mar 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant