Scully: cli: edge case where <!doctype html> is removed from dist/static/index.html

Created on 20 Dec 2019  路  6Comments  路  Source: scullyio/scully

馃悶 Bug report

Description

In some edge cases, the <!doctype html> in src/index.html and dist/web/index.html is removed in the generated dist/static/index.html.

馃敩 Minimal Reproduction

TBD. I reproduced this in one app, but not in a new CLI app. Investigating...

馃捇Your Environment

Angular Version:


Angular CLI: 9.0.0-rc.7
Node: 12.13.0
OS: darwin x64

Angular: 9.0.0-rc.7
... animations, cli, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router, service-worker
Ivy Workspace: Yes

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.900.0-rc.6
@angular-devkit/build-angular     0.900.0-rc.7
@angular-devkit/build-optimizer   0.900.0-rc.7
@angular-devkit/build-webpack     0.900.0-rc.7
@angular-devkit/core              9.0.0-rc.6
@angular-devkit/schematics        9.0.0-rc.6
@angular/cdk                      9.0.0-rc.6
@angular/fire                     5.2.3
@angular/material                 9.0.0-rc.6
@ngtools/webpack                  9.0.0-rc.7
@schematics/angular               9.0.0-rc.6
@schematics/update                0.900.0-rc.7
rxjs                              6.5.3
typescript                        3.6.4
webpack                           4.41.2

Scully Version:


    "@scullyio/init": "0.0.9",
    "@scullyio/ng-lib": "latest",
    "@scullyio/scully": "latest",

馃敟 Exception or Error


Current document does not have a doctype. This may cause some Angular Material components not to behave as expected.
_checkDoctypeIsDefined @ vendor-es2015.js:84784
bug need repo example

All 6 comments

I'm trying to debug this, but I am not sure exactly where to look. What code is actually used for processing the src/index.html file?

that is done by puppeteer. look in the pupeteerrenderer

@Splaktar can you reproduce this? If you can build a scenario that reproduces this, I will do the debugging and fix it.

It's reproducible, every time, in my project. I haven't been able to reproduce it in a brand new Angular CLI project (after some considerable time spent). I'll try to dig into the PupeteerRenderer on Thursday.

@Splaktar If you need some help setting up some debugging in there, I can help.
DM me and we can schedule something.

@SanderElias will do, but I need to focus on billable work for the rest of this decade 馃榿

Was this page helpful?
0 / 5 - 0 ratings

Related issues

nishimura-yuji picture nishimura-yuji  路  4Comments

spencerb02 picture spencerb02  路  3Comments

jorgeucano picture jorgeucano  路  4Comments

Gyrosh picture Gyrosh  路  5Comments

msprogramando picture msprogramando  路  5Comments