Closed crisbeto closed 6 years ago
This is two problems that we are approaching independently.
1) There is an error during template validation that is being reported because the the configuration of the the project is unexpected. We are now validating templates and the we are not able to find some of the metadata during emit.
2) The error reporting is getting lost and resulting in the violation of an internal constraint (that is, the decorator array should never contain a null
).
We are addressing (1) by tying template validation to fullTemplateTypeCheck
which is false
by default. Invoking ngc
for libraries will revert to the 4.0.0
behavior (just generating metadata instead of trying to validate it). The templates will now only be validated when fullTemplateTypeCheck
is enabled. @tbosch is working on this.
(2) is being addressed by reverting part of the change made to fix getLazyRoutes
for JIT programs. We switched to an error collection model (used by the language service) instead of an exception reporting model. We are switching back to exceptions for ngc
but will continue to use error collection for getLazyRoutes
and the language service. @chuckj is working on this.
We should support the configuration of projects that material is using and will address that post 5.0.0
.
Regarding (1): See https://github.com/angular/angular/pull/19909
Closing as the corresponding PRs have landed on master.
This is happening again with Ng-packagr v4, which has enabled both skipTemplateCodegen and fullTemplateTypeCheck, but relevantly to v4, also enableResourceInlining. Is that an inherently bad combination or a bug?
Reopen or new issue? @chuckjaz
Tsconfig: https://github.com/dherges/ng-packagr/blob/master/src/lib/ts/conf/tsconfig.ngc.json
Repro:
dependabot/npm_and_yarn/ng-packagr-4.0.0
branch)yarn
(v1.7.0)yarn lerna run prepare
, which just cleans and runs ng-packagr on eachAlso I didn’t mean to unassign @chuckjaz, maybe that’s a GitHub syntax thing. I’m not actually allowed to unassign people AFAIK, being a random user.
In TemplateParser#tryParseHtml
the values of htmlAstWithErrors.errors
contain null values. That's all I found out so far.
Angular CLI: 6.2.2
Node: 10.10.0
OS: linux x64
Angular: 6.1.7
... animations, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router
Package Version
-----------------------------------------------------------
@angular-devkit/architect 0.6.8
@angular-devkit/build-angular 0.6.8
@angular-devkit/build-optimizer 0.6.8
@angular-devkit/core 0.8.2
@angular-devkit/schematics 0.8.2
@angular/cdk 6.4.7
@angular/cli 6.2.2
@ngtools/json-schema 1.1.0
@ngtools/webpack 6.0.8
@schematics/angular 0.6.1
@schematics/update 0.8.2
ng-packagr 4.1.1
rxjs 6.3.2
typescript 2.9.2
webpack 4.8.3
After trying and trying, my workaround is to set fullTemplateTypeCheck: false
... i opened an issue on ng-packagr ng-packagr/ng-packagr#1087
This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.
I'm submitting a...
Current behavior
The compiler throws a null pointer error that points to this line.
Full stack trace:
Minimal reproduction of the problem with instructions
npm install
npm run demo-app
.Environment
cc @chuckjaz