更新angular-devkit并失败:Microsoft.AspNetCore.SpaServices [0]

时间:2019-09-24 05:57:51

标签: javascript node.js angular typescript asp.net-core

在Angular 8 + .net core 2.2中,我已从Angular 8.2.1升级到8.2.7 之后,我在控制台窗口中看到以下消息:

fail: Microsoft.AspNetCore.SpaServices[0]
      <s> [webpack.Progress] 10% building 1/1 modules 0 active
.......................
fail: Microsoft.AspNetCore.SpaServices[0]
      <s> [webpack.Progress] 98% after emitting

fail: Microsoft.AspNetCore.SpaServices[0]
      <s> [webpack.Progress] 98% after emitting CopyPlugin

fail: Microsoft.AspNetCore.SpaServices[0]
      <s> [webpack.Progress] 98% after emitting angular-compiler

fail: Microsoft.AspNetCore.SpaServices[0]
      <s> [webpack.Progress] 98% after emitting SizeLimitsPlugin

fail: Microsoft.AspNetCore.SpaServices[0]
      <s> [webpack.Progress] 100%

info: Microsoft.AspNetCore.SpaServices[0]
      chunk {main} main.js, main.js.map (main) 451 kB [initial] [rendered]
chunk {polyfills} polyfills.js, polyfills.js.map (polyfills) 287 kB [initial] [rendered]
chunk {polyfills-es5} polyfills-es5.js, polyfills-es5.js.map (polyfills-es5) 624 kB [initial] [rendered]
chunk {runtime} runtime.js, runtime.js.map (runtime) 6.15 kB [entry] [rendered]
chunk {styles} styles.js, styles.js.map (styles) 1.38 MB [initial] [rendered]
chunk {vendor} vendor.js, vendor.js.map (vendor) 6.49 MB [initial] [rendered]
Date: 2019-09-24T05:37:30.303Z - Hash: 688e97dd7591eb779072 - Time: 19723ms

info: Microsoft.AspNetCore.SpaServices[0]
      ** Angular Live Development Server is listening on localhost:2073, open your browser on http://localhost:2073/ **

info: Microsoft.AspNetCore.SpaServices[0]
      i 「wdm」: Compiled successfully.

似乎应用程序已编译并可以正常工作,我发现angular-devkit出了问题,如果我还原到以前的版本,一切正常 :

"@angular-devkit/build-angular": "^0.803.5",

还原为

"@angular-devkit/build-angular": "0.802.1",

是否有使用最新版本的修复程序?

1 个答案:

答案 0 :(得分:1)

使用时,我和您有同样的问题

"@angular-devkit/build-angular": "~0.803.3"

如果构建不成功,我总是会看到失败日志。在cli角度编译成功之后,一切都会好起来