ng build throws无法读取null异常的属性'startTag' [英] ng build throws Cannot read property 'startTag' of null exception

查看:120
本文介绍了ng build throws无法读取null异常的属性'startTag'的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想将Angular 8应用发布到IIS.然后,我开始按照部署说明进行操作. 当我使用base-href在prod模式下构建项目时,操作会引发错误.如果我在开发模式下构建(只是ng build),没有错误,但是我必须在生产模式下构建. --base-href导致错误.我现在该怎么办?

I want to publish my Angular 8 app to IIS. Then I've started to follow the deployment instructions. When I build my project on prod mode with base-href, operation throws an error. If I build in development mode(just ng build), there is no error but I have to build in production mode. --base-href causes the error. What can I do now?

这是错误:

无法读取null的属性"startTag" TypeError:无法读取null的属性"startTag" 在Object.augmentIndexHtml(D:\ ReklamUssuProjects \ DevBranch \ RULink \ RULink.UI \ Angular \ node_modules @ angular-devkit \ build-angular \ src \ angular-cli-files \ utilities \ index-file \ augment-index-html. js:126:55) 在compile.hooks.emit.tapPromise(D:\ ReklamUssuProjects \ DevBranch \ RULink \ RULink.UI \ Angular \ node_modules @ angular-devkit \ build-angular \ src \ angular-cli-files \ plugins \ index-html-webpack- plugin.js:70:60)

Cannot read property 'startTag' of null TypeError: Cannot read property 'startTag' of null at Object.augmentIndexHtml (D:\ReklamUssuProjects\DevBranch\RULink\RULink.UI\Angular\node_modules@angular-devkit\build-angular\src\angular-cli-files\utilities\index-file\augment-index-html.js:126:55) at compiler.hooks.emit.tapPromise (D:\ReklamUssuProjects\DevBranch\RULink\RULink.UI\Angular\node_modules@angular-devkit\build-angular\src\angular-cli-files\plugins\index-html-webpack-plugin.js:70:60)

推荐答案

当我问github angular cli问题时,问题解决了.再次谢谢你.

When I asked to github angular cli issues, problem was solved. Thank you again.

Github链接

这篇关于ng build throws无法读取null异常的属性'startTag'的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆