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"
    at onresolve (/private/tmp/node_modules/@cljs-oss/module-deps/index.js:181:30)
    at onResolve (/private/tmp/node_modules/enhanced-resolve/lib/Resolver.js:70:11)
    at innerCallback (/private/tmp/node_modules/enhanced-resolve/lib/Resolver.js:143:22)
    at callbackWrapper (/private/tmp/node_modules/enhanced-resolve/lib/createInnerCallback.js:10:21)
    at next (/private/tmp/node_modules/tapable/lib/Tapable.js:249:35)
    at innerCallback (/private/tmp/node_modules/enhanced-resolve/lib/Resolver.js:143:22)
    at callbackWrapper (/private/tmp/node_modules/enhanced-resolve/lib/createInnerCallback.js:10:21)
    at next (/private/tmp/node_modules/tapable/lib/Tapable.js:249:35)
    at resolver.doResolve.createInnerCallback (/private/tmp/node_modules/enhanced-resolve/lib/DescriptionFilePlugin.js:41:24)
    at callbackWrapper (/private/tmp/node_modules/enhanced-resolve/lib/createInnerCallback.js:10:21)

错误: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
...