Skip to content

EXCEPTION: No provider for t! in production build only #4752

@scottschafer

Description

@scottschafer

Please provide us with the following information:

OS?

OS X 10.11.6

Versions.

@angular/cli: 1.0.0-beta.31
node: 6.9.5
os: darwin x64
@angular/common: 2.4.7
@angular/compiler: 2.4.7
@angular/core: 2.4.7
@angular/forms: 2.4.7
@angular/http: 2.4.7
@angular/platform-browser: 2.4.7
@angular/platform-browser-dynamic: 2.4.7
@angular/router: 3.4.7
@angular/cli: 1.0.0-beta.31
@angular/compiler-cli: 2.4.7

Repro steps.

My repo is here:
https://github.com/scottschafer/BowlBlaster.git

If I run "ng serve", the application works just fine. However, if I deploy to github pages, or just use "ng serve -prod", I get a series of cryptic errors in the browser log.

The log given by the failure.

EXCEPTION: No provider for t!
t.handleError @ vendor.b857c3e….bundle.js:435
vendor.b857c3e….bundle.js:435 ORIGINAL STACKTRACE:
t.handleError @ vendor.b857c3e….bundle.js:435
vendor.b857c3e….bundle.js:435 Error: DI Error
at e.d (polyfills.1ea585f….bundle.js:37)
at e [as constructor] (vendor.b857c3e….bundle.js:260)
at e [as constructor] (vendor.b857c3e….bundle.js:752)
at new e (vendor.b857c3e….bundle.js:752)
at t._throwOrNull (vendor.b857c3e….bundle.js:1121)
at t._getByKeyDefault (vendor.b857c3e….bundle.js:1121)
at t._getByKey (vendor.b857c3e….bundle.js:1121)
at t.get (vendor.b857c3e….bundle.js:1121)
at e.get (vendor.b857c3e….bundle.js:456)
at e.t.injectorGet (vendor.b857c3e….bundle.js:127)
at e.createInternal (main.6bd317a….bundle.js:2)
at e.t.createHostView (vendor.b857c3e….bundle.js:127)
at t.create (vendor.b857c3e….bundle.js:78)
at e.bootstrap (vendor.b857c3e….bundle.js:246)
at vendor.b857c3e….bundle.js:246
t.handleError @ vendor.b857c3e….bundle.js:435
vendor.b857c3e….bundle.js:435 EXCEPTION: Uncaught (in promise): Error: DI Error
Error: DI Error
at e.d (https://scottschafer.github.io/BowlBlaster/polyfills.1ea585f55bc1325fd989.bundle.js:37:2213)
at e [as constructor] (https://scottschafer.github.io/BowlBlaster/vendor.b857c3eb223ff6ce7021.bundle.js:260:508)
at e [as constructor] (https://scottschafer.github.io/BowlBlaster/vendor.b857c3eb223ff6ce7021.bundle.js:752:228)
at new e (https://scottschafer.github.io/BowlBlaster/vendor.b857c3eb223ff6ce7021.bundle.js:752:555)
at t._throwOrNull (https://scottschafer.github.io/BowlBlaster/vendor.b857c3eb223ff6ce7021.bundle.js:1121:2766)
at t._getByKeyDefault (https://scottschafer.github.io/BowlBlaster/vendor.b857c3eb223ff6ce7021.bundle.js:1121:3104)
at t._getByKey (https://scottschafer.github.io/BowlBlaster/vendor.b857c3eb223ff6ce7021.bundle.js:1121:2485)
at t.get (https://scottschafer.github.io/BowlBlaster/vendor.b857c3eb223ff6ce7021.bundle.js:1121:848)
at e.get (https://scottschafer.github.io/BowlBlaster/vendor.b857c3eb223ff6ce7021.bundle.js:456:1144)
at e.t.injectorGet (https://scottschafer.github.io/BowlBlaster/vendor.b857c3eb223ff6ce7021.bundle.js:127:1750)
at e.createInternal (https://scottschafer.github.io/BowlBlaster/main.6bd317a007068db26aa0.bundle.js:2:2039)
at e.t.createHostView (https://scottschafer.github.io/BowlBlaster/vendor.b857c3eb223ff6ce7021.bundle.js:127:1288)
at t.create (https://scottschafer.github.io/BowlBlaster/vendor.b857c3eb223ff6ce7021.bundle.js:78:1949)
at e.bootstrap (https://scottschafer.github.io/BowlBlaster/vendor.b857c3eb223ff6ce7021.bundle.js:246:4321)
at https://scottschafer.github.io/BowlBlaster/vendor.b857c3eb223ff6ce7021.bundle.js:246:2567
t.handleError @ vendor.b857c3e….bundle.js:435
vendor.b857c3e….bundle.js:435 ORIGINAL STACKTRACE:
t.handleError @ vendor.b857c3e….bundle.js:435
vendor.b857c3e….bundle.js:435 Error: Uncaught (in promise): Error: DI Error
Error: DI Error
at e.d (polyfills.1ea585f….bundle.js:37)
at e [as constructor] (vendor.b857c3e….bundle.js:260)
at e [as constructor] (vendor.b857c3e….bundle.js:752)
at new e (vendor.b857c3e….bundle.js:752)
at t._throwOrNull (vendor.b857c3e….bundle.js:1121)
at t._getByKeyDefault (vendor.b857c3e….bundle.js:1121)
at t._getByKey (vendor.b857c3e….bundle.js:1121)
at t.get (vendor.b857c3e….bundle.js:1121)
at e.get (vendor.b857c3e….bundle.js:456)
at e.t.injectorGet (vendor.b857c3e….bundle.js:127)
at e.createInternal (main.6bd317a….bundle.js:2)
at e.t.createHostView (vendor.b857c3e….bundle.js:127)
at t.create (vendor.b857c3e….bundle.js:78)
at e.bootstrap (vendor.b857c3e….bundle.js:246)
at vendor.b857c3e….bundle.js:246
at d (polyfills.1ea585f….bundle.js:37)
at f (polyfills.1ea585f….bundle.js:37)
at polyfills.1ea585f….bundle.js:37
at t.invokeTask (polyfills.1ea585f….bundle.js:37)
at Object.onInvokeTask (vendor.b857c3e….bundle.js:197)
at t.invokeTask (polyfills.1ea585f….bundle.js:37)
at e.runTask (polyfills.1ea585f….bundle.js:37)
at i (polyfills.1ea585f….bundle.js:37)
t.handleError @ vendor.b857c3e….bundle.js:435
polyfills.1ea585f….bundle.js:37 Unhandled Promise rejection: No provider for t! ; Zone: angular ; Task: Promise.then ; Value: e Error: DI Error
at e.d (https://scottschafer.github.io/BowlBlaster/polyfills.1ea585f55bc1325fd989.bundle.js:37:2213)
at e [as constructor] (https://scottschafer.github.io/BowlBlaster/vendor.b857c3eb223ff6ce7021.bundle.js:260:508)
at e [as constructor] (https://scottschafer.github.io/BowlBlaster/vendor.b857c3eb223ff6ce7021.bundle.js:752:228)
at new e (https://scottschafer.github.io/BowlBlaster/vendor.b857c3eb223ff6ce7021.bundle.js:752:555)
at t._throwOrNull (https://scottschafer.github.io/BowlBlaster/vendor.b857c3eb223ff6ce7021.bundle.js:1121:2766)
at t._getByKeyDefault (https://scottschafer.github.io/BowlBlaster/vendor.b857c3eb223ff6ce7021.bundle.js:1121:3104)
at t._getByKey (https://scottschafer.github.io/BowlBlaster/vendor.b857c3eb223ff6ce7021.bundle.js:1121:2485)
at t.get (https://scottschafer.github.io/BowlBlaster/vendor.b857c3eb223ff6ce7021.bundle.js:1121:848)
at e.get (https://scottschafer.github.io/BowlBlaster/vendor.b857c3eb223ff6ce7021.bundle.js:456:1144)
at e.t.injectorGet (https://scottschafer.github.io/BowlBlaster/vendor.b857c3eb223ff6ce7021.bundle.js:127:1750)
at e.createInternal (https://scottschafer.github.io/BowlBlaster/main.6bd317a007068db26aa0.bundle.js:2:2039)
at e.t.createHostView (https://scottschafer.github.io/BowlBlaster/vendor.b857c3eb223ff6ce7021.bundle.js:127:1288)
at t.create (https://scottschafer.github.io/BowlBlaster/vendor.b857c3eb223ff6ce7021.bundle.js:78:1949)
at e.bootstrap (https://scottschafer.github.io/BowlBlaster/vendor.b857c3eb223ff6ce7021.bundle.js:246:4321)
at https://scottschafer.github.io/BowlBlaster/vendor.b857c3eb223ff6ce7021.bundle.js:246:2567
o @ polyfills.1ea585f….bundle.js:37
polyfills.1ea585f….bundle.js:37 d

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions