Quick start issue

#1

Decided to give Clojurescript a go while I’m evaluating different alternatives for front-end development. I seem to have hit a bit of an issue in the Quick Start. I setup the deps.edn (this is on Linux) and the folder structure is as it should be, but if I enter clj --main cljs.main --compile hello-world.core --repl from the project root directory (where the deps.edn file is), I get the following error:

Caused by: java.lang.IllegalArgumentException: Namespace hello-world.core does not exist. Please check that namespaces with dashes use underscores in the ClojureScript file name.

I’m not sure what I’m doing wrong. Any advice? Feeling a bit frustrated that I’m 2 minutes in and the intro guide doesn’t seem to work.

1 Like
#2

Make sure your file path on disk is src/hello_world/core.cljs – note the _ in the file path corresponding to the - in the namespace – and in core.cljs, you have (ns hello-world.core ...) with a -, not _.

#3

Both are correct and it still doesn’t seem to work.

#4

Is this resolved ? I just followed the QuickStart docs as it and able to get it run. Put the code here:

1 Like
#5

It would help if you can make your attempt available somewhere - otherwise it’s hard to guess what went wrong