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

Running lein figwheel throws java.lang.NullPointerException: Cannot invoke "clojure.lang.IFn.invoke(Object)" because "loc" is null #754

Open
mukundzare opened this issue Jun 14, 2022 · 1 comment

Comments

@mukundzare
Copy link

I have the following project.clj file:

(defproject test-prj "0.1.0-SNAPSHOT"
  :description "The test project"
  :url ""
  :jvm-opts ["-Xmx256m"]
  :dependencies [[org.clojure/clojure "1.10.3"]
                 [org.clojure/clojurescript "1.11.54"]
                 [com.stuartsierra/component "1.1.0"]
                 [compojure "1.7.0"]
                 [http-kit "2.5.3"]]
  :main main.app
  :profiles {:dev {:plugins [[lein-cljsbuild "1.1.8"]
                             [lein-figwheel "0.5.20"]]
                   :dependencies [[compojure "1.7.0"]
                                  [reloaded.repl "0.2.4"]]
                   :source-paths ["dev"]
                   :cljsbuild {:builds [{:source-paths ["src" "dev"]
                                         :compiler {:output-to "target/classes/public/app.js"
                                                    :output-dir "target/classes/public/out"
                                                    :figwheel true
                                                    :optimizations :none
                                                    :recompile-dependents true
                                                    :source-map true}}]}}})

When I run lein figwheel, I get the following error stack:

❯ lein do clean, figwheel
Java HotSpot(TM) 64-Bit Server VM warning: Options -Xverify:none and -noverify were deprecated in JDK 13 and will likely be removed in a future release.
Figwheel: Cutting some fruit, just a sec ...
Figwheel: Validating the configuration found in project.clj
java.lang.NullPointerException: Cannot invoke "clojure.lang.IFn.invoke(Object)" because "loc" is null
	at clojure.zip$node.invokeStatic(zip.clj:67)
	at clojure.zip$node.invoke(zip.clj:64)
	at strictly_specking_standalone.edn_string_nav$find_key_in_node.invokeStatic(edn_string_nav.clj:127)
	at strictly_specking_standalone.edn_string_nav$find_key_in_node.invoke(edn_string_nav.clj:126)
	at strictly_specking_standalone.edn_string_nav$find_key_value_in_node.invokeStatic(edn_string_nav.clj:137)
	at strictly_specking_standalone.edn_string_nav$find_key_value_in_node.invoke(edn_string_nav.clj:136)
	at strictly_specking_standalone.edn_string_nav$get_value_at_path$fn__7998.invoke(edn_string_nav.clj:157)
	at clojure.lang.ArrayChunk.reduce(ArrayChunk.java:63)
	at clojure.core.protocols$fn__8176.invokeStatic(protocols.clj:136)
	at clojure.core.protocols$fn__8176.invoke(protocols.clj:124)
	at clojure.core.protocols$fn__8136$G__8131__8145.invoke(protocols.clj:19)
	at clojure.core.protocols$seq_reduce.invokeStatic(protocols.clj:31)
	at clojure.core.protocols$fn__8166.invokeStatic(protocols.clj:75)
	at clojure.core.protocols$fn__8166.invoke(protocols.clj:75)
	at clojure.core.protocols$fn__8110$G__8105__8123.invoke(protocols.clj:13)
	at clojure.core$reduce.invokeStatic(core.clj:6830)
	at clojure.core$reduce.invoke(core.clj:6812)
	at strictly_specking_standalone.edn_string_nav$get_value_at_path.invokeStatic(edn_string_nav.clj:157)
	at strictly_specking_standalone.edn_string_nav$get_value_at_path.invoke(edn_string_nav.clj:154)
	at strictly_specking_standalone.edn_string_nav$get_loc_at_path.invokeStatic(edn_string_nav.clj:162)
	at strictly_specking_standalone.edn_string_nav$get_loc_at_path.invoke(edn_string_nav.clj:159)
	at strictly_specking_standalone.edn_string_nav$get_path_in_clj_file.invokeStatic(edn_string_nav.clj:208)
	at strictly_specking_standalone.edn_string_nav$get_path_in_clj_file.invoke(edn_string_nav.clj:189)
	at strictly_specking_standalone.error_printing$inline_missing_keys_QMARK_.invokeStatic(error_printing.clj:281)
	at strictly_specking_standalone.error_printing$inline_missing_keys_QMARK_.invoke(error_printing.clj:275)
	at strictly_specking_standalone.error_printing$pprint_missing_keys_in_file_context.invokeStatic(error_printing.clj:290)
	at strictly_specking_standalone.error_printing$pprint_missing_keys_in_file_context.invoke(error_printing.clj:288)
	at strictly_specking_standalone.core$eval8833$fn__8834.invoke(core.clj:567)
	at clojure.lang.MultiFn.invoke(MultiFn.java:229)
	at strictly_specking_standalone.core$inline_message_when_valid_path.invokeStatic(core.clj:1108)
	at strictly_specking_standalone.core$inline_message_when_valid_path.invoke(core.clj:1106)
	at strictly_specking_standalone.core$error__GT_display_data.invokeStatic(core.clj:1121)
	at strictly_specking_standalone.core$error__GT_display_data.invoke(core.clj:1113)
	at figwheel_sidecar.config$raise_one_error$fn__12877.invoke(config.clj:473)
	at figwheel_sidecar.config$raise_one_error.invokeStatic(config.clj:472)
	at figwheel_sidecar.config$raise_one_error.invoke(config.clj:465)
	at figwheel_sidecar.config$validate_project_config_data.invokeStatic(config.clj:497)
	at figwheel_sidecar.config$validate_project_config_data.invoke(config.clj:492)
	at figwheel_sidecar.config.LeinProjectConfigData._validate(config.clj:548)
	at figwheel_sidecar.config$validate_config_data$fn__13144.invoke(config.clj:698)
	at figwheel_sidecar.config$validate_config_data.invokeStatic(config.clj:694)
	at figwheel_sidecar.config$validate_config_data.invoke(config.clj:688)
	at figwheel_sidecar.config$print_validate_config_data$fn__13151.invoke(config.clj:707)
	at figwheel_sidecar.config$print_validate_config_data.invokeStatic(config.clj:706)
	at figwheel_sidecar.config$print_validate_config_data.invoke(config.clj:703)
	at figwheel_sidecar.config$validate_loop$fn__13200.invoke(config.clj:900)
	at figwheel_sidecar.config$validate_loop.invokeStatic(config.clj:899)
	at figwheel_sidecar.config$validate_loop.invoke(config.clj:881)
	at figwheel_sidecar.config$validate_lein_project_loop.invokeStatic(config.clj:950)
	at figwheel_sidecar.config$validate_lein_project_loop.invoke(config.clj:944)
	at figwheel_sidecar.config$interactive_validate.invokeStatic(config.clj:974)
	at figwheel_sidecar.config$interactive_validate.invoke(config.clj:971)
	at figwheel_sidecar.repl_api$validate_figwheel_conf.invokeStatic(repl_api.clj:170)
	at figwheel_sidecar.repl_api$validate_figwheel_conf.invoke(repl_api.clj:166)
	at figwheel_sidecar.repl_api$validate_and_return_final_config_data.invokeStatic(repl_api.clj:173)
	at figwheel_sidecar.repl_api$validate_and_return_final_config_data.invoke(repl_api.clj:172)
	at figwheel_sidecar.repl_api$launch_from_lein.invokeStatic(repl_api.clj:218)
	at figwheel_sidecar.repl_api$launch_from_lein.invoke(repl_api.clj:216)
	at user$eval24513.invokeStatic(form-init7454397158845953138.clj:1)
	at user$eval24513.invoke(form-init7454397158845953138.clj:1)
	at clojure.lang.Compiler.eval(Compiler.java:7181)
	at clojure.lang.Compiler.eval(Compiler.java:7171)
	at clojure.lang.Compiler.load(Compiler.java:7640)
	at clojure.lang.Compiler.loadFile(Compiler.java:7578)
	at clojure.main$load_script.invokeStatic(main.clj:475)
	at clojure.main$init_opt.invokeStatic(main.clj:477)
	at clojure.main$init_opt.invoke(main.clj:477)
	at clojure.main$initialize.invokeStatic(main.clj:508)
	at clojure.main$null_opt.invokeStatic(main.clj:542)
	at clojure.main$null_opt.invoke(main.clj:539)
	at clojure.main$main.invokeStatic(main.clj:664)
	at clojure.main$main.doInvoke(main.clj:616)
	at clojure.lang.RestFn.applyTo(RestFn.java:137)
	at clojure.lang.Var.applyTo(Var.java:705)
	at clojure.main.main(main.java:40)

I can't wrap my head around the error message. What seems to be wrong?

@kumar88kanishk
Copy link

kumar88kanishk commented Sep 20, 2022

-same here

(defproject undeadgame "0.1.0-SNAPSHOT"
:description "A web based game, learning from parens of the dead"

:url "http://example.com/FIXME"
:license {:name "GNU General Public License"
:url "http://www.gnu.org/licenses/gpl.html"}
:main undeadgame.system
:dependencies [[org.clojure/clojure "1.10.0"]
[org.clojure/clojurescript "1.11.60"]
[com.stuartsierra/component "1.1.0"]
[http-kit "2.6.0"]
[compojure "1.7.0"]
[quiescent "0.3.2"]]
:profiles {:dev {:plugins [[lein-cljsbuild "1.1.8"]
[lein-figwheel "0.5.20"]]
:dependencies [[reloaded.repl "0.2.4"]]
:source-paths ["dev"]
:cljsbuild {:builds [{:source-paths ["src" "dev"]
:figwheel true
:compiler {:output-to "target/classes/public/app.js"
:output-dir "target/classes/public/out"
:optimizations :none
:recompile-dependents true
:source-map true}}]}}})

kanishkkumar@Kanishks-MacBook-Pro undeadgame % lein do clean, figwheel Java HotSpot(TM) 64-Bit Server VM warning: Options -Xverify:none and -noverify were deprecated in JDK 13 and will likely be removed in a future release. Figwheel: Cutting some fruit, just a sec ... Retrieving figwheel/figwheel/0.5.20/figwheel-0.5.20.pom from clojars Retrieving figwheel-sidecar/figwheel-sidecar/0.5.20/figwheel-sidecar-0.5.20.pom from clojars Retrieving com/stuartsierra/component/1.0.0/component-1.0.0.pom from clojars Retrieving ring-cors/ring-cors/0.1.13/ring-cors-0.1.13.pom from clojars Retrieving co/deps/ring-etag-middleware/0.2.1/ring-etag-middleware-0.2.1.pom from clojars Retrieving org/clojure/core.async/0.4.474/core.async-0.4.474.jar from central Retrieving ring-cors/ring-cors/0.1.13/ring-cors-0.1.13.jar from clojars Retrieving co/deps/ring-etag-middleware/0.2.1/ring-etag-middleware-0.2.1.jar from clojars Retrieving figwheel/figwheel/0.5.20/figwheel-0.5.20.jar from clojars Retrieving figwheel-sidecar/figwheel-sidecar/0.5.20/figwheel-sidecar-0.5.20.jar from clojars Figwheel: Validating the configuration found in project.clj java.lang.NullPointerException: Cannot invoke "clojure.lang.IFn.invoke(Object)" because "loc" is null at clojure.zip$node.invokeStatic(zip.clj:67) at clojure.zip$node.invoke(zip.clj:64) at strictly_specking_standalone.edn_string_nav$find_key_in_node.invokeStatic(edn_string_nav.clj:127) at strictly_specking_standalone.edn_string_nav$find_key_in_node.invoke(edn_string_nav.clj:126) at strictly_specking_standalone.edn_string_nav$find_key_value_in_node.invokeStatic(edn_string_nav.clj:137) at strictly_specking_standalone.edn_string_nav$find_key_value_in_node.invoke(edn_string_nav.clj:136) at strictly_specking_standalone.edn_string_nav$get_value_at_path$fn__7997.invoke(edn_string_nav.clj:157) at clojure.lang.ArrayChunk.reduce(ArrayChunk.java:63) at clojure.core.protocols$fn__8139.invokeStatic(protocols.clj:136) at clojure.core.protocols$fn__8139.invoke(protocols.clj:124) at clojure.core.protocols$fn__8099$G__8094__8108.invoke(protocols.clj:19) at clojure.core.protocols$seq_reduce.invokeStatic(protocols.clj:31) at clojure.core.protocols$fn__8129.invokeStatic(protocols.clj:75) at clojure.core.protocols$fn__8129.invoke(protocols.clj:75) at clojure.core.protocols$fn__8073$G__8068__8086.invoke(protocols.clj:13) at clojure.core$reduce.invokeStatic(core.clj:6828) at clojure.core$reduce.invoke(core.clj:6810) at strictly_specking_standalone.edn_string_nav$get_value_at_path.invokeStatic(edn_string_nav.clj:157) at strictly_specking_standalone.edn_string_nav$get_value_at_path.invoke(edn_string_nav.clj:154) at strictly_specking_standalone.edn_string_nav$get_loc_at_path.invokeStatic(edn_string_nav.clj:162) at strictly_specking_standalone.edn_string_nav$get_loc_at_path.invoke(edn_string_nav.clj:159) at strictly_specking_standalone.edn_string_nav$get_path_in_clj_file.invokeStatic(edn_string_nav.clj:208) at strictly_specking_standalone.edn_string_nav$get_path_in_clj_file.invoke(edn_string_nav.clj:189) at strictly_specking_standalone.error_printing$inline_missing_keys_QMARK_.invokeStatic(error_printing.clj:281) at strictly_specking_standalone.error_printing$inline_missing_keys_QMARK_.invoke(error_printing.clj:275) at strictly_specking_standalone.error_printing$pprint_missing_keys_in_file_context.invokeStatic(error_printing.clj:290) at strictly_specking_standalone.error_printing$pprint_missing_keys_in_file_context.invoke(error_printing.clj:288) at strictly_specking_standalone.core$eval8832$fn__8833.invoke(core.clj:567) at clojure.lang.MultiFn.invoke(MultiFn.java:229) at strictly_specking_standalone.core$inline_message_when_valid_path.invokeStatic(core.clj:1108) at strictly_specking_standalone.core$inline_message_when_valid_path.invoke(core.clj:1106) at strictly_specking_standalone.core$error__GT_display_data.invokeStatic(core.clj:1121) at strictly_specking_standalone.core$error__GT_display_data.invoke(core.clj:1113) at figwheel_sidecar.config$raise_one_error$fn__12876.invoke(config.clj:473) at figwheel_sidecar.config$raise_one_error.invokeStatic(config.clj:472) at figwheel_sidecar.config$raise_one_error.invoke(config.clj:465) at figwheel_sidecar.config$validate_project_config_data.invokeStatic(config.clj:497) at figwheel_sidecar.config$validate_project_config_data.invoke(config.clj:492) at figwheel_sidecar.config.LeinProjectConfigData._validate(config.clj:548) at figwheel_sidecar.config$validate_config_data$fn__13143.invoke(config.clj:698) at figwheel_sidecar.config$validate_config_data.invokeStatic(config.clj:694) at figwheel_sidecar.config$validate_config_data.invoke(config.clj:688) at figwheel_sidecar.config$print_validate_config_data$fn__13150.invoke(config.clj:707) at figwheel_sidecar.config$print_validate_config_data.invokeStatic(config.clj:706) at figwheel_sidecar.config$print_validate_config_data.invoke(config.clj:703) at figwheel_sidecar.config$validate_loop$fn__13199.invoke(config.clj:900) at figwheel_sidecar.config$validate_loop.invokeStatic(config.clj:899) at figwheel_sidecar.config$validate_loop.invoke(config.clj:881) at figwheel_sidecar.config$validate_lein_project_loop.invokeStatic(config.clj:950) at figwheel_sidecar.config$validate_lein_project_loop.invoke(config.clj:944) at figwheel_sidecar.config$interactive_validate.invokeStatic(config.clj:974) at figwheel_sidecar.config$interactive_validate.invoke(config.clj:971) at figwheel_sidecar.repl_api$validate_figwheel_conf.invokeStatic(repl_api.clj:170) at figwheel_sidecar.repl_api$validate_figwheel_conf.invoke(repl_api.clj:166) at figwheel_sidecar.repl_api$validate_and_return_final_config_data.invokeStatic(repl_api.clj:173) at figwheel_sidecar.repl_api$validate_and_return_final_config_data.invoke(repl_api.clj:172) at figwheel_sidecar.repl_api$launch_from_lein.invokeStatic(repl_api.clj:218) at figwheel_sidecar.repl_api$launch_from_lein.invoke(repl_api.clj:216) at user$eval24509.invokeStatic(form-init1436800898526805543.clj:1) at user$eval24509.invoke(form-init1436800898526805543.clj:1) at clojure.lang.Compiler.eval(Compiler.java:7176) at clojure.lang.Compiler.eval(Compiler.java:7166) at clojure.lang.Compiler.load(Compiler.java:7635) at clojure.lang.Compiler.loadFile(Compiler.java:7573) at clojure.main$load_script.invokeStatic(main.clj:452) at clojure.main$init_opt.invokeStatic(main.clj:454) at clojure.main$init_opt.invoke(main.clj:454) at clojure.main$initialize.invokeStatic(main.clj:485) at clojure.main$null_opt.invokeStatic(main.clj:519) at clojure.main$null_opt.invoke(main.clj:516) at clojure.main$main.invokeStatic(main.clj:598) at clojure.main$main.doInvoke(main.clj:561) at clojure.lang.RestFn.applyTo(RestFn.java:137) at clojure.lang.Var.applyTo(Var.java:705) at clojure.main.main(main.java:37)

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

2 participants