angular-cli: SimpleNotificationsModule fails to load with angular-cli v1.5.0-rc8 under AOT

Bug Report or Feature Request (mark with an x)

- [x ] bug report -> please search issues before submitting
- [ ] feature request

Versions.

Angular CLI: 1.5.0-rc.8 Node: 8.8.1 OS: win32 x64 Angular: …

Repro steps.

with latest version of angular-cli(v1.5.0-rc.8) and angular 5.0.0-rc.9 with aot getting following error


ERROR in ./node_modules/angular2-notifications/src/simple-notifications/components/simple-notifications.component.ngfactory.ts
Module build failed: Error: C:\Users\Asad\dev\ngcli150\node_modules\angular2-notifications\src\simple-notifications\components\simple-notifications.component.ngfactory.ts is not part of the
compilation. Please make sure it is in your tsconfig via the 'files' or 'include' property.
    at AngularCompilerPlugin.getCompiledFile (C:\Users\Asad\dev\ngcli150\node_modules\@ngtools\webpack\src\angular_compiler_plugin.js:624:23)
    at plugin.done.then (C:\Users\Asad\dev\ngcli150\node_modules\@ngtools\webpack\src\loader.js:467:39)
    at <anonymous>
 @ ./src/app/app.component.ngfactory.js 9:0-141
 @ ./src/app/app.module.ngfactory.js
 @ ./src/main.ts
 @ multi webpack-dev-server/client?http://0.0.0.0:0 ./src/main.ts

Without AOT it works fine.

Note: I have to update typescript version to latest as well to make it work with latest angular and cli version.

Here is repo to reproduce this issue:

https://github.com/asadsahi/ngcli150

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Reactions: 5
  • Comments: 15 (8 by maintainers)

Commits related to this issue

Most upvoted comments

@filipesilva is there any guidance you can give on how to recommend that a library be packaged “properly”? Is there a simple test we can do so that we can submit a pull request to a given package, and be sure that the pull request will fix the issue?

@filipesilva Fixing the known problematic libraries is one important step, but if the breaking change that stops those libraries from working will remain, it would also be good if there were some sort of compiler warning (both for AOT and no-aot) when a library improperly includes TS files, so that unknown problematic libraries can be easily identified.

To give you all an update on the issue, @hansl is trying to work with the library authors of known problematic libraries to sort these issues out.

The library’s package.json is missing a typings field. It probably should be:

"typings": "./dist/index.d.ts",