2024年Clojure调查问卷!中分享您的想法。

欢迎!请参阅关于页面以获取有关如何使用的更多信息。

0
ClojureScript

$ clj -m cljs.main -co '{:npm-deps {"readable-stream" "2.3.6"} :install-deps true}' -r
ClojureScript 1.10.339
cljs.user=> (require 'readable-stream)
events.js:183
      throw er; // 未处理的 'error' 事件
      ^

错误:未找到模块:从文件/private/tmp/node_modules/readable-stream/lib/_stream_readable.js中的“util”
    在/private/tmp/node_modules/@cljs-oss/module-deps/index.js:181:30上resolveError
    在/private/tmp/node_modules/enhanced-resolve/lib/Resolver.js:70:11上resolve
    在/private/tmp/node_modules/enhanced-resolve/lib/Resolver.js:143:22上innerCallback
    在/private/tmp/node_modules/enhanced-resolve/lib/createInnerCallback.js:10:21上callbackWrapper
    在/private/tmp/node_modules/tapable/lib/Tapable.js:249:35上next
    在/private/tmp/node_modules/enhanced-resolve/lib/Resolver.js:143:22上innerCallback
    在/private/tmp/node_modules/enhanced-resolve/lib/createInnerCallback.js:10:21上callbackWrapper
    在/private/tmp/node_modules/tapable/lib/Tapable.js:249:35上next
    在/private/tmp/node_modules/enhanced-resolve/lib/DescriptionFilePlugin.js:41:24上resolver.doResolve.createInnerCallback
    在/private/tmp/node_modules/enhanced-resolve/lib/createInnerCallback.js:10:21上callbackWrapper

错误:goog.require无法找到:readable_stream
     在goog/base.js:711:20
     require (clojure/browser/repl.cljs:226:33)
cljs.user=>


显然与https://github.com/webpack/node-libs-browser有关

2 答案

0

评论者:mfikes

我不知道这是否是获得Closure对Webpack的支持以解决这个问题的一个问题。(https://github.com/google/closure-compiler/commit/d0867871bbcbba44eedcb94ed2fbdab661067f42)

0
...