emezeske / lein-cljsbuild

Leiningen plugin to make ClojureScript development easy.
Other
1.1k stars 151 forks source link

Could not write JavaScript nil #489

Closed NZaleski closed 6 years ago

NZaleski commented 6 years ago

Every time I try to run lein cljsbuild once I get an error that Could not write JavaScript nil

Here is what I have been doing.

  1. Create a new project called finance lein new app finance
  2. Update the project.clj file with dependencies, cljsbuild, plugin and main spec (see attached)
  3. Run lein deps and this works
  4. Rnu lein run and that also works, spitting out 'Hello World' in the console.
  5. Try to run lein cljsbuild once and then I get this error that Could not write JavaScript nil

project.txt

mneise commented 6 years ago

The exception you are getting is thrown by the ClojureScript compiler and isn't caused by lein-cljsbuild. You get the exception because you don't have any ClojureScript files in your project. To solve this problem you need to add a core.cljs file to the src/finance/ directory.