我有一个应用程序构建Durandal
并用于Weyland
构建它。我已经Weyland
全局安装,当我在weyland build -c "path\to\config"
本地运行命令时它可以工作并产生以下输出
info jshint Linting 6 files.
info jshint Passed for App/cart/config.js.
info jshint Passed for App/cart/main.js.
info jshint Passed for App/cart/services/datacontext.js.
info jshint Passed for App/cart/viewmodels/cart.js.
info jshint Passed for App/cart/viewmodels/nextsteps.js.
info jshint Passed for App/cart/viewmodels/shell.js.
info uglifyjs Uglifying 22 files.
info uglifyjs Uglified App/cart/config.js.
info uglifyjs Uglified App/cart/main.js.
WARN: Dropping unused function argument c [null:22,32]
当我在 Azure Dev Ops 中运行相同的序列而不是WARN
我得到错误:
呃!uglifyjs TypeError: sys.error 不是函数
info jshint Linting 6 files.
info jshint Passed for App/cart/config.js.
info jshint Passed for App/cart/main.js.
info jshint Passed for App/cart/services/datacontext.js.
info jshint Passed for App/cart/viewmodels/cart.js.
info jshint Passed for App/cart/viewmodels/nextsteps.js.
info jshint Passed for App/cart/viewmodels/shell.js.
info uglifyjs Uglifying 22 files.
info uglifyjs Uglified App/cart/config.js.
info uglifyjs Uglified App/cart/main.js.
ERR! uglifyjs TypeError: sys.error is not a function
堆栈跟踪:
ERR! uglifyjs TypeError: sys.error is not a function
ERR! uglifyjs at Function.UglifyJS.AST_Node.warn_function (C:\npm\prefix\node_modules\weyland\node_modules\uglify-js\tools\node.js:42:9)
ERR! uglifyjs at Function.AST_Node.warn (C:\npm\prefix\node_modules\weyland\node_modules\uglify-js\lib\ast.js:110:18)
ERR! uglifyjs at Compressor.warn (C:\npm\prefix\node_modules\weyland\node_modules\uglify-js\lib\compress.js:81:27)
ERR! uglifyjs at TreeTransformer.before (C:\npm\prefix\node_modules\weyland\node_modules\uglify-js\lib\compress.js:956:44)
ERR! uglifyjs at AST_Defun.transform (C:\npm\prefix\node_modules\weyland\node_modules\uglify-js\lib\transform.js:61:35)
ERR! uglifyjs at C:\npm\prefix\node_modules\weyland\node_modules\uglify-js\lib\transform.js:80:25
ERR! uglifyjs at doit (C:\npm\prefix\node_modules\weyland\node_modules\uglify-js\lib\utils.js:114:23)
ERR! uglifyjs at MAP (C:\npm\prefix\node_modules\weyland\node_modules\uglify-js\lib\utils.js:140:52)
ERR! uglifyjs at do_list (C:\npm\prefix\node_modules\weyland\node_modules\uglify-js\lib\transform.js:79:16)
ERR! uglifyjs at C:\npm\prefix\node_modules\weyland\node_modules\uglify-js\lib\transform.js:168:21
正在使用命令行任务执行构建。
我的电脑和管道都配置了
Node v12.16.2
NPM 6.14.4
为什么 Azure Pipeline VM 无法显示警告?我怎样才能解决这个问题?