1
我創建這個教程一個新項目:AspNetCore +角2:WebpackDevMiddleware錯誤與新項目
下一頁一些解決的問題,我現在已經安裝了所有依賴完整的項目,但是當我用IIS啓動項目,我有這個錯誤。
L'exception System.AggregateException s'est produite
HResult=0x80131500
Message=One or more errors occurred.
Source=<Impossible d'évaluer la source de l'exception>
Arborescence des appels de procédure :
at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)
at Microsoft.AspNetCore.Builder.WebpackDevMiddleware.UseWebpackDevMiddleware(IApplicationBuilder appBuilder, WebpackDevMiddlewareOptions options)
at Test.Startup.Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory) in C:\VS2017\Project\Test\Startup.cs:line 44
Exception interne 1 :
Exception : Call to Node module failed with error: Webpack dev middleware failed because of an error while loading 'aspnet-webpack'. Error was: C:\VS2017\Project\Test\node_modules\webpack\lib\webpack.js:7
const Compiler = require("./Compiler");
^^^^^
SyntaxError: Use of const in strict mode.
at exports.runInThisContext (vm.js:73:16)
at Module._compile (module.js:443:25)
at Object.Module._extensions..js (module.js:478:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Module.require (module.js:365:17)
at require (module.js:384:17)
at Object.<anonymous> (C:\VS2017\Project\Test\node_modules\aspnet-webpack\WebpackDevMiddleware.js:4:15)
at Module._compile (module.js:460:26)
at Object.Module._extensions..js (module.js:478:10)
Current directory is: C:\VS2017\Project\Test
我不知道這一步我失敗了,所以如果有人已經做到了。
使用節點6的Im – Elykx
@Elykx你確定嗎?你可以在命令行中輸入「node -v」並註釋結果嗎? – Wazner
那就是我得到的 節點-v v0.12.2 – Elykx