[英]Angular and ASP.NET Core MVC: "Uncaught SyntaxError: Unexpected token '<'" for index file references when deployed
[英]ASP.NET Core Angular template in Visual Studio 2017 fails to build with “SyntaxError: Unexpected token”
無法生成使用Visual Studio 2017(Enterprise)中的Angular ASP.NET Core Web應用程序模板創建的新項目。 到目前為止,我已經在兩台機器上復制了此內容。 構建輸出如下所示:
1>Performing first-run Webpack build...
1>C:\git\zoeri\zoeri-azure-graphs\samples\Zoeri.Azure.Graphs.Sample.Web\node_modules\webpack\bin\webpack.js:186
1> outputOptions.children = options.map(o => o.stats);
1> ^^
1>SyntaxError: Unexpected token =>
1> at exports.runInThisContext (vm.js:73:16)
1> at Module._compile (module.js:443:25)
1> at Object.Module._extensions..js (module.js:478:10)
1> at Module.load (module.js:355:32)
1> at Function.Module._load (module.js:310:12)
1> at Function.Module.runMain (module.js:501:10)
1> at startup (node.js:129:16)
1> at node.js:814:3
1>C:\git\zoeri\zoeri-azure-graphs\samples\Zoeri.Azure.Graphs.Sample.Web\Zoeri.Azure.Graphs.Sample.Web.csproj(33,5): error MSB3073: The command "node node_modules/webpack/bin/webpack.js --config webpack.config.vendor.js" exited with code 1.
1>Done building project "Zoeri.Azure.Graphs.Sample.Web.csproj" -- FAILED.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
期待任何幫助!
問題出在ECMASCRIPT版本,基本上是JS版本。 嘗試使用最新的nodejs或4.5以上的節點(需要使用'use strict';選項)
==>是ES6中使用的新語法
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.