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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

es2015 build throws error in dev and production mode (with and without build-optimizer and aot) #11090

Closed
kdcro101 opened this issue May 1, 2018 · 3 comments
Assignees

Comments

@kdcro101
Copy link

kdcro101 commented May 1, 2018

Bug, feature request, or proposal:

Bug

What is the expected behavior?

To run project using target: "es2015" in production mode without errors

What is the current behavior?

Project is built successfully but error is thrown in browser.

ng build --prod --build-optimizer false --aot false

main.3e9735c59cd97e9287dc.js:1 ERROR TypeError: Cannot read property 'runOutsideAngular' of undefined
    at new C (main.3e9735c59cd97e9287dc.js:1)
    at new S (main.3e9735c59cd97e9287dc.js:1)
    at Lo (main.3e9735c59cd97e9287dc.js:1)
    at To (main.3e9735c59cd97e9287dc.js:1)
    at us (main.3e9735c59cd97e9287dc.js:1)
    at Object.cs [as createEmbeddedView] (main.3e9735c59cd97e9287dc.js:1)
    at ho.createEmbeddedView (main.3e9735c59cd97e9287dc.js:1)
    at po.createEmbeddedView (main.3e9735c59cd97e9287dc.js:1)
    at _t._updateView (main.3e9735c59cd97e9287dc.js:1)
    at _t.set ngIf [as ngIf] (main.3e9735c59cd97e9287dc.js:1)

ng build

PrivateLayoutComponent.html:3 ERROR TypeError: Cannot read property 'runOutsideAngular' of undefined
    at new MatDrawer (sidenav.js:174)
    at new MatSidenav (sidenav.js:834)
    at createClass (core.js:11927)
    at createDirectiveInstance (core.js:11774)
    at createViewNodes (core.js:13236)
    at createEmbeddedView (core.js:13113)
    at callWithDebugContext (core.js:14521)
    at Object.debugCreateEmbeddedView [as createEmbeddedView] (core.js:13856)
    at TemplateRef_.createEmbeddedView (core.js:11294)
    at ViewContainerRef_.createEmbeddedView (core.js:11083)

What are the steps to reproduce?

Use angular+material2 using target:"es2015" , in development and production mode (wihout build-optimizer and aot)

Which versions of Angular, Material, OS, TypeScript, browsers are affected?

browser:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.181 Safari/537.36

ng -v output:

Angular CLI: 6.0.0-rc.8
Node: 10.0.0
OS: linux x64
Angular: 6.0.0-rc.6
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, router

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.5.11
@angular-devkit/build-angular     0.5.11
@angular-devkit/build-optimizer   0.5.11
@angular-devkit/core              0.5.11
@angular-devkit/schematics        0.5.11
@angular/cdk                      6.0.0-rc.14
@angular/cli                      6.0.0-rc.8
@angular/flex-layout              6.0.0-beta.15
@angular/material                 6.0.0-rc.14
@ngtools/webpack                  6.0.0-rc.9
@schematics/angular               0.5.11
@schematics/update                0.5.11
rxjs                              6.0.0
typescript                        2.7.2
webpack                           4.6.0

Is there anything else we should know?

I've checked #10567

@JamesAlexander42
Copy link

Is there any update on this?

@mmalerba
Copy link
Contributor

As mentioned in #10567 es2015 does not work with JIT. Please see angular/angular#15127 and angular/angular-cli#7797. closing this issue since there's currently nothing to do on the Angular Material side

@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 9, 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

3 participants