无法发布asp.net核心/角度项目.无法解析app.server.module.ngfactory?

编程入门 行业动态 更新时间:2024-10-10 23:20:06
本文介绍了无法发布asp核心/角度项目.无法解析app.server.module.ngfactory?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

使用VS2017角度模板并创建了一个应用.然后尝试发布它.我还升级到了Angular5.

Used the VS2017 angular template and created an app. Then tried to publish it. I also upgraded to Angular 5.

任何关于ngfactory错误的想法都是关于???

Any idea with this error about ngfactory is about ???

ERROR找不到模块:错误:无法解析'./../$$_gendir/ClientApp/app/app.server.module.ngfactory"位于"C:\ Users \ Matt_Herb \ downloads \ ibewsurveytemp \ ibewsurveytemp \ ClientApp"中[C:\ Users \ Matt_Herb \ downloads \ ibewsurveytemp \ ibewsurveytemp \ IbewSurveyTemp.csproj]@ ./ClientApp/boot.server.ts 8:0-94

ERROR in ./ClientApp/boot.server.ts Module not found : error : Can't resolve './../$$_gendir/ClientApp/app/app.server.module.ngfacto ry' in 'C:\Users\Matt_Herb\downloads\ibewsurveytemp\ibewsurveytemp\ClientApp' [C:\Users\Matt_Her b\downloads\ibewsurveytemp\ibewsurveytemp\IbewSurveyTemp.csproj] @ ./ClientApp/boot.server.ts 8:0-94

EXEC:错误ERROR:请更新@ angular/cli.Angular 5+至少需要Angular CLI 1.5+ [C:\ Users \ Matt_Herb \ downloads \ ibewsurveytemp \ ibewsurveytemp \ IbewSurveyTemp.csproj]在throwNotSupportedError(C:\ Users \ Matt_Herb \ downloads \ ibewsurveytemp \ ibewsurveytemp \包\ compiler-cli \ src \ ngtools_api.ts:132:9)在Function.NgTools_InternalApi_NG_2.codeGen(C:\ Users \ Matt_Herb \ downloads \ ibewsurveytemp \ ibewsurveytemp \ packages \ compiler-cli \ src \ ngtools_api.ts:80:11)在_donePromise.Promise.resolve.then(C:\ Users \ Matt_Herb \ downloads \ ibewsurveytemp \ ibewsurveytemp \ node_modules \ @ngtools \ webpack \ src \ plugin.js:430:58)在在process._tickCallback(内部/进程/next_tick.js:188:7)在Function.Module.runMain(module.js:684:11)在启动时(bootstrap_node.js:191:16)在bootstrap_node.js:613:3C:\ Users \ Matt_Herb \ downloads \ ibewsurveytemp \ ibewsurveytemp \ IbewSurveyTemp.csproj(48,5):错误MSB3073:命令"node node_modules/webpack/bin/webpack.js --env.prod"已退出,代码为2.

EXEC : ERROR in error : Please update @angular/cli. Angular 5+ requires at least Angular CLI 1.5 + [C:\Users\Matt_Herb\downloads\ibewsurveytemp\ibewsurveytemp\IbewSurveyTemp.csproj] at throwNotSupportedError (C:\Users\Matt_Herb\downloads\ibewsurveytemp\ibewsurveytemp\ packages\compiler-cli\src\ngtools_api.ts:132:9) at Function.NgTools_InternalApi_NG_2.codeGen (C:\Users\Matt_Herb\downloads\ibewsurveyt emp\ibewsurveytemp\packages\compiler-cli\src\ngtools_api.ts:80:11) at _donePromise.Promise.resolve.then (C:\Users\Matt_Herb\downloads\ibewsurveytemp\ibew surveytemp\node_modules\@ngtools\webpack\src\plugin.js:430:58) at at process._tickCallback (internal/process/next_tick.js:188:7) at Function.Module.runMain (module.js:684:11) at startup (bootstrap_node.js:191:16) at bootstrap_node.js:613:3 C:\Users\Matt_Herb\downloads\ibewsurveytemp\ibewsurveytemp\IbewSurveyTemp.csproj(48,5): error MS B3073: The command "node node_modules/webpack/bin/webpack.js --env.prod" exited with code 2.

推荐答案

好...看来您的依赖项有问题,等等.

ok ... it looks like a problem with your dependencies and so on ..try this:

1 - update your angular cli with : npm install -g @angular/cli 2 - delete your node_modules in your project (maybe with rimraf) 3 - delete your package-lock.json file (if you've one) 4 - try to run in a different folder ng new testProject --skip-install=true (so it generate WITHOUT install packages a new angular project ..) 5 - go in that project and copy the @angular and other dependencies in package.json file and paste in your project .. save the updated package.json file of your project 6 - run a npm install --f in your project 7 - try to run a ng serve .. and check if the project load

希望对您有帮助

更多推荐

无法发布asp.net核心/角度项目.无法解析app.server.module.ngfactory?

本文发布于:2023-11-16 01:55:43,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1599948.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:角度   核心   项目   net   asp

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!