2024年Clojure状态调查!中分享您的想法。

欢迎!请参阅关于页面以获取更多关于本站如何运作的信息。

0 投票
ClojureScript

按照https://script.clojure.org/guides/code-splitting(并添加一个deps.edn文件以依赖cljs)的指南进行,在单击加载:bar模块的按钮时得到了这个错误。

uncaught exception: AssertionError: Failure: expected object of type TrustedResourceUrl, got '/out/goog/base.js' of type string asserts.js:94:3
DEFAULT_ERROR_HANDLER http://localhost:9000/out/goog/asserts/asserts.js:94
fail http://localhost:9000/out/goog/asserts/asserts.js:245
unwrapTrustedScriptURL http://localhost:9000/out/goog/html/trustedresourceurl.js:228
unwrap http://localhost:9000/out/goog/html/trustedresourceurl.js:196
map self-hosted:251
map http://localhost:9000/out/goog/array/array.js:288
LoadStatus http://localhost:9000/out/goog/module/moduleloader.js:271
createForIds_ http://localhost:9000/out/goog/module/moduleloader.js:286
loadModules http://localhost:9000/out/goog/module/moduleloader.js:72
bind_applyFunctionN self-hosted:1059
<anonymous> self-hosted:1017
loadModules_ http://localhost:9000/out/goog/module/modulemanager.js:249
loadModulesOrEnqueue_ http://localhost:9000/out/goog/module/modulemanager.js:213
execOnLoad http://localhost:9000/out/goog/module/modulemanager.js:381
cljs$core$IFn$_invoke$arity$2 http://localhost:9000/out/cljs/loader.js:102
cljs$loader$load http://localhost:9000/out/cljs/loader.js:81
<anonymous> http://localhost:9000/out/foo/core.js:11
fireListener http://localhost:9000/out/goog/events/events.js:753
handleBrowserEvent_ http://localhost:9000/out/goog/events/events.js:879
f http://localhost:9000/out/goog/events/events.js:296

在我搜索中看到有人对ModuleManager (CLJS-3224) 进行了更改,以便调用setModuleTrustedUris,但是没有对编译器提供的module-uris从普通字符串转换为所需的TrustedResourceUrl对象进行处理。

1 答案

0 投票

编辑
...