我试图运行以下命令:
java -jar -XX:-TieredCompilation node_modules/google-closure-compiler/compiler.jar --flagfile="/tmp/499a750e-98bc-4afa-b333-fb08fa71351e" --js=/home/ubuntu/santa-tracker-web/components/closure-library/closure/goog/base.js --externs=node_modules/google-closure-compiler/contrib/externs/google_universal_analytics_api.js --compilation_level=ADVANCED_OPTIMIZATIONS --warning_level=VERBOSE --language_in=ECMASCRIPT6_STRICT --language_out=ECMASCRIPT5_STRICT --define=santaAPIRequest.BASE="https://santa-api.appspot.com/" --output_wrapper=(function(){%output%}).call(window); --rewrite_polyfills=false --generate_exports=true --export_local_property_definitions=true --jscomp_warning=accessControls --jscomp_warning=const --jscomp_warning=visibility --js_output_file="santa.min.js"这实际上是一个来自一个吞咽文件的错误,但是我已经将这个问题缩小到了这个特定的代码行,这就产生了上述问题。它抱怨语法--但在我看来,我无法理解似乎是什么问题。
提前谢谢!
发布于 2019-11-13 23:02:01
你必须用引号来保护
function(){%output%}).call(window);从外壳:
java -jar -XX:-TieredCompilation node_modules/google-closure-compiler/compiler.jar --flagfile="/tmp/499a750e-98bc-4afa-b333-fb08fa71351e" --js=/home/ubuntu/santa-tracker-web/components/closure-library/closure/goog/base.js --externs=node_modules/google-closure-compiler/contrib/externs/google_universal_analytics_api.js --compilation_level=ADVANCED_OPTIMIZATIONS --warning_level=VERBOSE --language_in=ECMASCRIPT6_STRICT --language_out=ECMASCRIPT5_STRICT --define=santaAPIRequest.BASE="https://santa-api.appspot.com/" --output_wrapper='(function(){%output%}).call(window);' --rewrite_polyfills=false --generate_exports=true --export_local_property_definitions=true --jscomp_warning=accessControls --jscomp_warning=const --jscomp_warning=visibility --js_output_file="santa.min.js"https://askubuntu.com/questions/1188581
复制相似问题