[英]Can't resolve all parameters for HttpXsrfCookieExtractor: (?, [object Object], [object Object])
I`m developing an asp.net core with angular 4.3.6. 我正在开发一个角度为4.3.6的asp.net核心。 application. 应用。
I tried to install @angular/cli and i got this error: 我尝试安装@ angular / cli,但出现此错误:
Error: Module build failed: Error: ENOENT: no such file or directory, open
I reopened VS and i got: 我重新打开VS,我得到了:
Prerendering failed because of error: Error: Module build failed: TypeError: loaderUtils.getOptions is not a function
I install 'loader-utils' and i Got: 我安装了“ loader-utils”,我得到了:
Webpack dev middleware failed because of an error while loading 'aspnet-webpack'. Error was: Error: Cannot find module 'webpack'
I install webpack and i got: 我安装了webpack,我得到了:
Can't resolve all parameters for HttpXsrfCookieExtractor: (?, [object Object], [object Object])
And I don't know why I'm getting this and I don't know what to do next. 而且我不知道为什么要得到这个,也不知道下一步该怎么做。
I fixed the issue by following the solution from the link below 我通过以下链接中的解决方案解决了该问题
https://github.com/aspnet/Templates/issues/866 https://github.com/aspnet/Templates/issues/866
Whenyou update your stuff, you need to repack your code... 更新内容时,您需要重新打包代码...
webpack --config webpack.config.vendor.js
webpack
if you are unable to do this on the command line, you need to install the webpack package globally 如果您无法在命令行上执行此操作,则需要全局安装webpack软件包
npm install --global webpack
Alternatively, you can also delete the /wwwroot/dist/
folder to force a full re-compilation upon the first project build. 或者,您也可以删除/wwwroot/dist/
文件夹,以在首次构建项目时强制完全重新编译。
IMO is the most easy way to force repack. IMO是强制重新包装的最简单方法。
I am trying to update to Angular 4.3.6 and I got the same exception. 我试图更新到Angular 4.3.6,但遇到了同样的异常。 Looks like it is not possible to upgrade to 4.3.0+ 似乎无法升级到4.3.0+
https://github.com/aspnet/JavaScriptServices/issues/1242 https://github.com/aspnet/JavaScriptServices/issues/1242
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.