2017-09-14 68 views
1

我在哪裏錯過了「)」?關於vsts的Webpack任務構建失敗

我有點困惑,在stackoverflow和網上搜索似乎只返回不相關的信息。

我使用這個的WebPack extention github和正在運行的asp.net核心2角模板,我已經添加的唯一事情就是@角/材料

,這是設置:

enter image description here

這裏發生了什麼?

##[error]SyntaxError: missing) after argument list 
2017-09-14T20:08:13.7000981Z ##[debug]Processed: ##vso[task.issue type=error;]SyntaxError: missing) after argument list 
2017-09-14T20:08:13.7000981Z C:\NPM\Modules\webpack:2 
2017-09-14T20:08:13.7000981Z basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") 
2017-09-14T20:08:13.7000981Z   ^^^^^^^ 
2017-09-14T20:08:13.7000981Z SyntaxError: missing) after argument list 
2017-09-14T20:08:13.7000981Z  at createScript (vm.js:56:10) 
2017-09-14T20:08:13.7000981Z  at Object.runInThisContext (vm.js:97:10) 
2017-09-14T20:08:13.7000981Z  at Module._compile (module.js:542:28) 
2017-09-14T20:08:13.7000981Z  at Object.Module._extensions..js (module.js:579:10) 
2017-09-14T20:08:13.7000981Z  at Module.load (module.js:487:32) 
2017-09-14T20:08:13.7000981Z  at tryModuleLoad (module.js:446:12) 
2017-09-14T20:08:13.7000981Z  at Function.Module._load (module.js:438:3) 
2017-09-14T20:08:13.7000981Z  at Module.require (module.js:497:17) 
2017-09-14T20:08:13.7010970Z  at require (internal/module.js:20:19) 
2017-09-14T20:08:13.7010970Z  at Object.resolveWebpackModule (d:\a\_tasks\webpack_6752a610-c2f3-11e6-949e-5d3841f133f1\3.0.19\webpackModuleResolver\WebpackModuleResolver.js:6:11) 

Debug output from vsts

+0

看起來你有一個包含shell腳本'BASEDIR = $(目錄名稱等等等等)'webpack正在嘗試作爲一個JavaScript文件運行。 – Jimmy

+0

我正在使用這個擴展https://marketplace.visualstudio.com/items?itemName=Dealogic.webpack-vsts-extension它要求一個webpack.config.js文件 – RoarG

+0

如果您將構建排隊到私有代理上,結果如何( https://docs.microsoft.com/en-gb/vsts/build-release/actions/agents/v2-windows)在本地機器上安裝了webpack? –

回答

0

獲取相同的行爲,當你安裝的WebPack全球。

解決方法是在故宮的WebPack本地安裝安裝任務: enter image description here ,然後指定安裝的WebPack本地路徑: enter image description here

相關問題