Editor not loading: "Error when loading resource"

Hi there, I hope you’re having a great 2025 so far! :slight_smile:

My project has a server/ directory which contains a Node.js app inside the Defold project. It turns out the editor fails to start because of errors parsing node_modules/.bin/* files at start time.

This issue started happening on latest versions of the Defold Editor. Is it possible to make the editor ignore the node_modules folder? :eyes: Thank you!

Full editor logs

Last editor log:

Caused by: java.lang.AssertionError: Assert failed: (and (not= :folder (resource/source-type resource)) (resource/exists? resource))
	at editor.defold_project$load_resource_node.invokeStatic(defold_project.clj:107)
	... 38 common frames omitted
2025-01-29 10:21:35.618 7848 [JavaFX Application Thread] ERROR editor.error-reporting - {:line 115, :ex-data {:node-type #internal.node.NodeTypeRef{:k :editor.placeholder-resource/PlaceholderResourceNode}, :proj-path "/server/node_modules/.bin/he"}}
clojure.lang.ExceptionInfo: Error when loading resource '/server/node_modules/.bin/he'
	at editor.defold_project$load_resource_node.invokeStatic(defold_project.clj:134)
	at editor.defold_project$node_load_info_tx_data.invokeStatic(defold_project.clj:242)
	at editor.defold_project$load_tx_data$iter__38327__38331$fn__38332$fn__38333.invoke(defold_project.clj:289)
	at editor.defold_project$load_tx_data$iter__38327__38331$fn__38332.invoke(defold_project.clj:286)
	at clojure.lang.LazySeq.force(LazySeq.java:50)
	at clojure.lang.LazySeq.realize(LazySeq.java:89)
	at clojure.lang.LazySeq.seq(LazySeq.java:106)
	at clojure.lang.ChunkedCons.chunkedNext(ChunkedCons.java:61)
	at clojure.lang.ChunkedCons.next(ChunkedCons.java:45)
	at clojure.lang.RT.next(RT.java:733)
	at clojure.core$next__5470.invokeStatic(core.clj:64)
	at clojure.core$dorun.invokeStatic(core.clj:3150)
	at clojure.core$doall.invokeStatic(core.clj:3156)
	at editor.defold_project$load_tx_data.invokeStatic(defold_project.clj:286)
	at editor.defold_project$load_nodes_into_graph_BANG_$fn__38387.invoke(defold_project.clj:390)
	at editor.defold_project$load_nodes_into_graph_BANG_.invokeStatic(defold_project.clj:390)
	at editor.defold_project$load_nodes_BANG_.invokeStatic(defold_project.clj:419)
	at editor.defold_project$load_project$fn__38458.invoke(defold_project.clj:517)
	at clojure.lang.AFn.applyToHelper(AFn.java:152)
	at clojure.lang.AFn.applyTo(AFn.java:144)
	at clojure.core$apply.invokeStatic(core.clj:667)
	at clojure.core$with_bindings_STAR_.invokeStatic(core.clj:1990)
	at clojure.core$with_bindings_STAR_.doInvoke(core.clj:1990)
	at clojure.lang.RestFn.invoke(RestFn.java:428)
	at editor.defold_project$load_project.invokeStatic(defold_project.clj:506)
	at editor.defold_project$open_project_BANG_.invokeStatic(defold_project.clj:1252)
	at editor.boot_open_project$open_project_BANG_.invokeStatic(boot_open_project.clj:387)
	at editor.boot_open_project$open_project_BANG_.invoke(boot_open_project.clj:385)
	at clojure.lang.AFn.applyToHelper(AFn.java:171)
	at clojure.lang.AFn.applyTo(AFn.java:144)
	at clojure.core$apply.invokeStatic(core.clj:667)
	at editor.boot$open_project_with_progress_dialog$fn__111579.invoke(boot.clj:63)
	at editor.dialogs$make_load_project_dialog$fn__29599$fn__29602.invoke(dialogs.clj:440)
	at clojure.core$binding_conveyor_fn$fn__5842.invoke(core.clj:2047)
	at clojure.lang.AFn.call(AFn.java:18)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
	at java.base/java.lang.Thread.run(Thread.java:1583)
Caused by: java.lang.AssertionError: Assert failed: (and (not= :folder (resource/source-type resource)) (resource/exists? resource))
	at editor.defold_project$load_resource_node.invokeStatic(defold_project.clj:107)
	... 38 common frames omitted
1 Like

Yes, it is possible: Defold project ignores

4 Likes

Thank you for the swift response @AGulev - after creating .defignore it worked :slight_smile:

/server/node_modules
4 Likes