question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

No provider for t!

See original GitHub issue

Hi,

Using the latest version, but when I build to prod using AOT i get the following error

Unhandled Promise rejection: No provider for t! ; Zone: angular ; Task: Promise.then ; Value: Error: No provider for t!
    at x (vendor.20cb9d4….bundle.js:10)
    at k (vendor.20cb9d4….bundle.js:10)
    at t._throwOrNull (vendor.20cb9d4….bundle.js:25)
    at t._getByKeyDefault (vendor.20cb9d4….bundle.js:25)
    at t._getByKey (vendor.20cb9d4….bundle.js:25)
    at t.get (vendor.20cb9d4….bundle.js:25)
    at n.t.get (vendor.20cb9d4….bundle.js:25)
    at pn (vendor.20cb9d4….bundle.js:19)
    at cn (vendor.20cb9d4….bundle.js:19)
    at on (vendor.20cb9d4….bundle.js:19) Error: No provider for t!
    at x (http://localhost/vendor.20cb9d4a563c5eb31e10.bundle.js:10:275)
    at k (http://localhost/vendor.20cb9d4a563c5eb31e10.bundle.js:10:534)
    at t._throwOrNull (http://localhost/vendor.20cb9d4a563c5eb31e10.bundle.js:25:22223)
    at t._getByKeyDefault (http://localhost/vendor.20cb9d4a563c5eb31e10.bundle.js:25:22556)
    at t._getByKey (http://localhost/vendor.20cb9d4a563c5eb31e10.bundle.js:25:21941)
    at t.get (http://localhost/vendor.20cb9d4a563c5eb31e10.bundle.js:25:20349)
    at n.t.get (http://localhost/vendor.20cb9d4a563c5eb31e10.bundle.js:25:27866)
    at pn (http://localhost/vendor.20cb9d4a563c5eb31e10.bundle.js:19:5908)
    at cn (http://localhost/vendor.20cb9d4a563c5eb31e10.bundle.js:19:4750)
    at on (http://localhost/vendor.20cb9d4a563c5eb31e10.bundle.js:19:3005)

I am using node 8.0.0 and npm 5.0.1 with Angular cli,

    _                      _                 ____ _     ___
   / \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|
  / △ \ | '_ \ / _` | | | | |/ _` | '__|   | |   | |    | |
 / ___ \| | | | (_| | |_| | | (_| | |      | |___| |___ | |
/_/   \_\_| |_|\__, |\__,_|_|\__,_|_|       \____|_____|___|
               |___/
@angular/cli: 1.1.0
node: 8.0.0
os: darwin x64
@angular/animations: 4.1.3
@angular/common: 4.1.3
@angular/compiler: 4.1.3
@angular/core: 4.1.3
@angular/forms: 4.1.3
@angular/http: 4.1.3
@angular/material: 2.0.0-beta.6-52b6692
@angular/platform-browser: 4.1.3
@angular/platform-browser-dynamic: 4.1.3
@angular/router: 4.1.3
@angular/cli: 1.1.0
@angular/compiler-cli: 4.1.3

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5

github_iconTop GitHub Comments

7reactions
MrFrankecommented, Jun 7, 2017

@limpep i fix this: Change import from import { NotificationsService } from 'angular2-notifications/dist'; to import { NotificationsService } from 'angular2-notifications';

Hope it’s help.

1reaction
MrFrankecommented, Jun 7, 2017

+1 I have that error with lazy load module and AOT:

 No provider for NotificationsService!
Read more comments on GitHub >

github_iconTop Results From Across the Web

Error: No provider for t - angular - Stack Overflow
You are trying to use a service that is not listed in providers of your AppModule. Add the service to a providers list...
Read more >
I was getting "Error: No provider for t" during AoT compilation ...
I was getting "Error: No provider for t" during AoT compilation and found out that was happening because I had constructor( translate: ...
Read more >
NG0201: No provider for {token} found! - Angular
A provider is a mapping that supplies a value that you can inject into the constructor of a class in your application. Read...
Read more >
[Debugging] NullInjectorError: No provider for {Class}!
In this video, you'll learn what the error "NullInjectorError: No provider for {Class}! ... Your browser can' t play this video.
Read more >
NullInjectorError: No provider for MDBModalService!
You have a typo in the main MDB module import. You're importing MDBBootstrapModulePro which contains only Pro classes. You should import MDBBootstrapModulesPro ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found