kanaka / clojurescript

Clojure to JS compiler (patched to allow compiling of compiler to ClojureScript)
189 stars 15 forks source link

Uncaught Error: Undefined nameToPath for cljs.repl #36

Closed fooqri closed 11 years ago

fooqri commented 11 years ago

I am new to closurescript, and this looks like a really cool project I would like to try to get running. I am particularly interested in the feature "You can have a ClojureScript REPL web app that runs locally in your browser (no server involved after loading the page)"

I cloned and followed the instructions to build the webrepl using steps below:

cd web ../bin/cljsc ../src/cljs/webrepl.cljs > webrepl.js

But when loading jsrepl.html I get the error "Uncaught Error: Undefined nameToPath for cljs.repl. (base.js:586)" I saw an older issue that was answered with a need to run the bootstrap script, which didn't help me. It seems like it is unclear what to use from the main clojurescript project, versus this patch to make it possible to run the repl native in the browser as in your demo.

It seems like I am missing a step for how to build all of the js files needed to run the webrepl (for example cljs/repl.js). I also tried manually building everything from the src directory using the various dependencies (starting from webrepl.js) but hit trouble when building the compiler.js with the included cljsc (which I am assuming is the future enhancement to compile itself, so what am I missing to get this working? Any advice would be greatly appreciated. I would be happy to update instructions if something has changed to get it working or if there is an assumption I am missing, etc. Any ideas where I went wrong with getting it running?

fooqri commented 11 years ago

Well that was embarrassing, looks like I had a duplicate CLOJURESCRIPT_HOME env var I must have set a long time ago that points to an old clojurscript directory. I made it past this issue when I removed the old var so CLOJURESCRIPT_HOME was pointing to the right directory.