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.

Cannot find module 'angular2-notifications'. since Angular 5.2.10

See original GitHub issue

Using version 0.9.7

Since last time I’ve updated my packages, I’m getting this compilation error:

ERROR in src/app/app.module.ts(22,43): error TS2307: Cannot find module 'angular2-notifications'.

Apparently, replacing:

import { SimpleNotificationsModule } from 'angular2-notifications';

with:

import { SimpleNotificationsModule } from 'angular2-notifications/dist';

is solving the issue, but then my unit tests fail with:

Error: StaticInjectorError(DynamicTestModule)[options]: 
  StaticInjectorError(Platform: core)[options]: 
    NullInjectorError: No provider for options!

Issue Analytics

  • State:open
  • Created 5 years ago
  • Reactions:8
  • Comments:14 (3 by maintainers)

github_iconTop GitHub Comments

6reactions
flauccommented, Apr 16, 2018

Can you please try updating to v1.0.0. I think you should not get that issue then, at least with @angular/cli

3reactions
DominicBoettgercommented, Apr 30, 2018

Problem with 1.0.1 here. Seems that the main file can’t be found. Downgraded to 0.9.7 and works.

Read more comments on GitHub >

github_iconTop Results From Across the Web

angular2-notifications - npm
A light and easy to use notifications library for Angular 2. ~~It features both regular page notifications (toasts) and push notifications.
Read more >
How to resolve angular build failure "Angular2-Notification ...
You need to update angular2-notifications to latest version.
Read more >
Angular2 Notifications Example - StackBlitz
A light and easy to use notifications library for Angular.
Read more >
Error: Cannot find module "." thrown when running --prod
ionic cordova run android --prod gives the following error after the splash screen. it works without error if --prod flag is absent Error: ......
Read more >
ModuleWithProviders Migration - Angular
The schematic will print a TODO comment in the event that it cannot detect the correct generic for the ModuleWithProviders type. In this...
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