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

欢迎!请查看关于页面,了解更多有关如何使用本网站的详情。

0
ClojureScript

按照https://script.clojure.org/guides/code-splitting指南(并添加一个针对 cljs 依赖的 deps.edn)进行操作,在点击加载 :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 https://127.0.0.1:9000/out/goog/asserts/asserts.js:94
fail https://127.0.0.1:9000/out/goog/asserts/asserts.js:245
unwrapTrustedScriptURL https://127.0.0.1:9000/out/goog/html/trustedresourceurl.js:228
unwrap https://127.0.0.1:9000/out/goog/html/trustedresourceurl.js:196
map self-hosted:251
map https://127.0.0.1:9000/out/goog/array/array.js:288
LoadStatus https://127.0.0.1:9000/out/goog/module/moduleloader.js:271
createForIds_ https://127.0.0.1:9000/out/goog/module/moduleloader.js:286
loadModules https://127.0.0.1:9000/out/goog/module/moduleloader.js:72
bind_applyFunctionN self-hosted:1059
<anonymous> self-hosted:1017
loadModules_ https://127.0.0.1:9000/out/goog/module/modulemanager.js:249
loadModulesOrEnqueue_ https://127.0.0.1:9000/out/goog/module/modulemanager.js:213
execOnLoad https://127.0.0.1:9000/out/goog/module/modulemanager.js:381
cljs$core$IFn$_invoke$arity$2 https://127.0.0.1:9000/out/cljs/loader.js:102
cljs$loader$load https://127.0.0.1:9000/out/cljs/loader.js:81
<anonymous> https://127.0.0.1:9000/out/foo/core.js:11
fireListener https://127.0.0.1:9000/out/goog/events/events.js:753
handleBrowserEvent_ https://127.0.0.1:9000/out/goog/events/events.js:879
f https://127.0.0.1:9000/out/goog/events/events.js:296

在我的搜索中看到,对 ModuleManager(CLJS-3224)进行了一个更改,但并没有针对编译器提供的 module-uris 从纯字符串转换为所需的 TrustedResourceUrl 对象进行任何操作。

1 个答案

0

编辑
...