Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

ERROR in : TypeError: Cannot read property 'visit' of undefined #27254

Closed
PhilipMantrov opened this issue Nov 24, 2018 · 5 comments
Closed

ERROR in : TypeError: Cannot read property 'visit' of undefined #27254

PhilipMantrov opened this issue Nov 24, 2018 · 5 comments

Comments

@PhilipMantrov
Copy link

馃悶 bug report

Affected Package

The issue is caused by package @angular/compiler

Is this a regression?

Yes, the previous version in which this bug was not present was Angular 6.1

Description

After update big application from Angular 6.1 to Angular 7.1, this bug appear

馃敟 Exception or Error


ERROR in : TypeError: Cannot read property 'visit' of undefined
    at convertPropertyBinding (C:\git\evodesk-frontend\node_modules\@angular\compiler\bundles\compiler.umd.js:7038:52)
    at TemplateDefinitionBuilder.convertPropertyBinding (C:\git\evodesk-frontend\node_modules\@angular\compiler\bundles\compiler.umd.js:14187:44)
    at C:\git\evodesk-frontend\node_modules\@angular\compiler\bundles\compiler.umd.js:13993:35
    at C:\git\evodesk-frontend\node_modules\@angular\compiler\bundles\compiler.umd.js:14147:71
    at C:\git\evodesk-frontend\node_modules\@angular\compiler\bundles\compiler.umd.js:13633:86
    at Array.map ()
    at TemplateDefinitionBuilder.buildTemplateFunction (C:\git\evodesk-frontend\node_modules\@angular\compiler\bundles\compiler.umd.js:13633:56)
    at C:\git\evodesk-frontend\node_modules\@angular\compiler\bundles\compiler.umd.js:14067:60
    at C:\git\evodesk-frontend\node_modules\@angular\compiler\bundles\compiler.umd.js:13626:81
    at Array.forEach ()
    at TemplateDefinitionBuilder.buildTemplateFunction (C:\git\evodesk-frontend\node_modules\@angular\compiler\bundles\compiler.umd.js:13626:37)
    at C:\git\evodesk-frontend\node_modules\@angular\compiler\bundles\compiler.umd.js:14067:60
    at C:\git\evodesk-frontend\node_modules\@angular\compiler\bundles\compiler.umd.js:13626:81
    at Array.forEach ()
    at TemplateDefinitionBuilder.buildTemplateFunction (C:\git\evodesk-frontend\node_modules\@angular\compiler\bundles\compiler.umd.js:13626:37)
    at compileComponentFromMetadata (C:\git\evodesk-frontend\node_modules\@angular\compiler\bundles\compiler.umd.js:14848:58)

馃實 Your Environment


Angular CLI: 7.0.6
Node: 9.6.1
OS: win32 x64
Angular: 7.1.0
... animations, cdk, common, compiler, compiler-cli, core, forms
... http, language-service, material, material-moment-adapter
... platform-browser, platform-browser-dynamic, platform-server
... router

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.10.6
@angular-devkit/build-angular     0.10.6
@angular-devkit/build-optimizer   0.10.6
@angular-devkit/build-webpack     0.10.6
@angular-devkit/core              7.0.6
@angular-devkit/schematics        7.0.6
@angular/cli                      7.0.6
@ngtools/webpack                  7.0.6
@schematics/angular               7.0.6
@schematics/update                0.10.6
rxjs                              6.3.3
typescript                        3.1.6
webpack                           4.19.1

Anything else relevant?
I think its related with lazyloading modules, after update to Angular 7, it cant build with string path in loadChildren (() => ModuleName works perfectly in build without aot).

@JoostK
Copy link
Member

JoostK commented Nov 24, 2018

Could you share your tsconfig.json configurations? The stack trace indicates that the Ivy compilation path is being taking under the current AOT compiler, which should only be activated when enableIvy is configured as such.

@PhilipMantrov
Copy link
Author

PhilipMantrov commented Nov 24, 2018

Could you share your tsconfig.json configurations? The stack trace indicates that the Ivy compilation path is being taking under the current AOT compiler, which should only be activated when enableIvy is configured as such.

Oh, thx man, enableIvy: false and now everything builds well.
But why does it happen? We had Ivy compiler in Angular 6.1 and we did not have any problem with it.

@JoostK
Copy link
Member

JoostK commented Nov 25, 2018

Well, it surprises me that you have been using the Ivy compiler for production already?

It is actually a legitimate bug in Ivy's template compiler. After inspecting the code I can find a code path where a template AST EmptyExpr node will cause your issue to occur.

At this moment in time the team does not yet accept Ivy issues on GH, so there's nothing you need to do right now. I'll put this on my list to have a look at sometime 馃憤

@PhilipMantrov
Copy link
Author

PhilipMantrov commented Nov 25, 2018

Well, it surprises me that you have been using the Ivy compiler for production already?

Yea, from the start refactoring of project (Angular 6.0, then 6.1, now 7.1). We use Ivy from August in production and its work's correctly until now. And i dont remeber that we was configure anything else, we was just add in tsconfig "enableIvy": true.

@angular-automatic-lock-bot
Copy link

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.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 14, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants