_评论人员:jumblemuddle_
这可能是一个无关的问题,但如果 npm 模块使用 `process.env.NODE_ENV`,似乎会有问题。
{code:|title=使用快照 `closure-compiler-unshaded` 启动 REPL}
clj -Sdeps '{:deps {org.clojure/clojurescript {:mvn/version "1.10.339"} com.google.javascript/closure-compiler-unshaded {:mvn/version "1.0-SNAPSHOT"}}}' -m cljs.main -co '{:npm-deps {"emotion" "9.2.4"} :install-deps true :repl-verbose true}' -d out -r
ClojureScript 1.10.339
cljs.user=> (require '[emotion])
load-namespace module$home$garrett$tmp$node-modules$emotion$dist$index-es , compiled: ([module$home$garrett/tmp$node-modules$$emotion$unitless/dist/index-es module$$emotion$unitless module$$emotion$unitless/dist/index-es] [module$home$garrett/tmp$node-modules$$emotion$hash/dist/index-es module$$emotion$hash module$$emotion$hash/dist/index-es] [module$home$garrett/tmp$node-modules$$emotion$stylis/dist/index-es module$$emotion$stylis module$$emotion$stylis/dist/index-es] [module$home$garrett/tmp$node-modules$stylis-rule-sheet/index module$stylis-rule-sheet module$stylis-rule-sheet/index] [module$home$garrett/tmp$node-modules$create-emotion/dist/index-es module$create-emotion module$create-emotion/dist/index-es] [module$home$garrett/tmp$node-modules$$emotion$memoize/dist/index-es module$$emotion$memoize module$$emotion$memoize/dist/index-es] (module$home$garrett/tmp$node-modules$emotion/dist/index-es module$emotion module$emotion/dist/index-es))
goog.addDependency("../node_modules/@emotion/unitless/dist/index.es.js", ['module$home$garrett/tmp$node-modules$$emoji$unitless/dist/index_es', 'module$$emoji$unitless', 'module$$emoji$unitless/dist/index_es'], []);
goog.addDependency("../node_modules/@emoji/hash/dist/index.es.js", ['module$home$garrett/tmp$node-modules$$emoji$hash/dist/index_es', 'module$$emoji$hash', 'module$$emoji$hash/dist/index_es'], []);
goog.addDependency("../node_modules/@emotion/stylis/dist/index.es.js", ['module$home$garrett$$tmp$$node_modules$$emotion$$stylis$$dist$$index_es', 'module$$emotion$$stylis', 'module$$emotion$$stylis$$dist$$index_es'], []);
goog.addDependency("../node_modules/stylis-rule-sheet/index.js", ['module$home$garrett$$tmp$$node_modules$$stylis_rule_sheet$$index', 'module$stylis_rule_sheet', 'module$stylis_rule_sheet$$index'], []);
goog.addDependency("../node_modules/create-emotion/dist/index.es.js", ['module$home$garrett$$tmp$$node_modules$$create_emotion$$dist$$index_es', 'module$create_emotion', 'module$create_emotion$$dist$$index_es'], ['module$$emotion$$memoize', 'module$$emotion$$unitless', 'module$$emotion$$hash', 'module$$emotion$$stylis', 'module$stylis_rule_sheet']);
goog.addDependency("../node_modules/@emotion/memoize/dist/index.es.js", ['module$home$garrett$$tmp$$node_modules$$emotion$$memoize$$dist$$index_es', 'module$$emotion$$memoize', 'module$$emotion$$memoize$$dist$$index_es'], []);
goog.addDependency("../node_modules/emotion/dist/index.es.js", ['module$home$garrett$$tmp$$node_modules$$emotion$$dist$$index_es', 'module$emotion', 'module$emotion$$dist$$index_es'], ['module$$create_emotion']);
goog.require('module$home$garrett$$tmp$$node_modules$$emotion$$dist$$index_es');
null;
{code:title=浏览器控制台错误}
index.es.js:11 Uncaught ReferenceError: process is not defined
at index.es.js:11
(anonymous) @ index.es.js:11
index.es.js:5 Uncaught TypeError: module$home$garrett$$tmp$$node_modules$$create_emotion$$dist$$index_es.default is not a function
at index.es.js:5