I recently updated my project from Angular 5 to Angular 6. Post-upgrade, everything compiles without errors. However, when I try to access the website, all I see is a blank screen. Upon inspecting the console, I came across the following error message:
The current document lacks a doctype declaration. This might result in certain Angular Material components not functioning as expected. push../node_modules/@angular/material/esm5/core.es5.js.MatCommonModule._checkDoctypeIsDefined @ core.es5.js:127 MatCommonModule @ core.es5.js:92 _createClass @ core.js:8116 createProviderInstance$1 @ core.js:8088 initNgModule @ core.js:8024 NgModuleRef @ core.js:8747 createNgModuleRef @ core.js:8736 debugCreateNgModuleRef @ core.js:10561 push../node_modules/@angular/core/fesm5/core.js.NgModuleFactory_.create @ core.js:11263 (anonymous) @ core.js:4161 push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invoke @ zone.js:388 onInvoke @ core.js:3671 ......
A TypeError is encountered, saying 'Cannot read property 'appendChild' of null', pointing to the issue within MatCommonModule.push../node_modules/@angular/material/esm5/core.es5.js.MatCommonModule._checkThemeIsPresent at core.es5.js:141. Seems like something went wrong during the upgrade process.
Could this be related to a problem with @angular/material
, or did something not get upgraded correctly in the project?
If you require any additional information to troubleshoot the issue, please let me know.