无法解析HttpXsrfCookieExtractor的所有参数:(?,[object Object],[object Object])

M. *_*iu 1 webpack angular

我正在开发一个角度为4.3.6的asp.net核心.应用.

我试图安装@ angular/cli,我收到了这个错误:

Error: Module build failed: Error: ENOENT: no such file or directory, open
Run Code Online (Sandbox Code Playgroud)

我重新打开了VS,我得到了:

Prerendering failed because of error: Error: Module build failed: TypeError: loaderUtils.getOptions is not a function  
Run Code Online (Sandbox Code Playgroud)

我安装'loader-utils'并得到:

Webpack dev middleware failed because of an error while loading 'aspnet-webpack'. Error was: Error: Cannot find module 'webpack' 
Run Code Online (Sandbox Code Playgroud)

我安装了webpack,我得到了:

Can't resolve all parameters for HttpXsrfCookieExtractor: (?, [object Object], [object Object])
Run Code Online (Sandbox Code Playgroud)

我不知道为什么我得到这个,我不知道接下来该做什么.

Nou*_*tti 5

我通过以下链接解决了问题

https://github.com/aspnet/Templates/issues/866

当你更新你的东西时,你需要重新包装你的代码......

webpack --config webpack.config.vendor.js 
webpack
Run Code Online (Sandbox Code Playgroud)

如果您无法在命令行上执行此操作,则需要全局安装webpack

npm install --global webpack
Run Code Online (Sandbox Code Playgroud)