Shadow-cljs is giving namespace error

clojurescript

#1
_$ shadow-cljs watch modern-cljs_

Error Prompt:

Invalid Filename, got cljs/modern_cljs/core.cljs but expected modern_cljs/core.cljs (or .cljc)

My shadow-cljs.edn file:

    {:source-paths ["src"]
     :dependencies []
     :builds {:modern-cljs {:output-dir "public/js"
                            :asset-path "/js"
                            :target :browser
                            :modules {:main {:entries [modern-cljs.core]}}
                            :devtools {:http-root "public"
                                       :http-port 8080}}}}

Directory Structure (inside modern-cljs folder):

build.boot package.json public shadow-cljs.edn src

./public:
index.html  js

./public/js:
cljs-runtime  main.js  manifest.edn

./src:
cljs

./src/cljs:
modern_cljs

./src/cljs/modern_cljs:
core.cljs  login.cljs

#2

As the error shows the expected filename is modern_cljs/core.cljs but you have cljs/modern_cljs/core.cljs. So you should be using :source-paths ["src/cljs"]. The expected name is expected to be found on any of the :source-paths or in your :dependencies.