-
Notifications
You must be signed in to change notification settings - Fork 12k
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
SimpleNotificationsModule fails to load with angular-cli v1.5.0-rc8 under AOT #8263
Comments
I had same issue, the older version: 1.5.0-rc.3 is fine. The build is also fine for 1.5.0-rc.8 if following files have been removed from node_modules/angular2-notifications/src/simple-notifications/components |
The library should not have typescript source files present in its published package. It appears that the presence of an |
@clydin do you know why it doesn't happen in non-aot mode? Does that mean this issue needs to be raised with library owners? |
At a minimum it should be raised with library owners. Even if there was not an underlying issue, the extra files are taking up hard drive space. In addition there is potentially an issue with the priority of main file resolution of a module. The behavior here may be intended but further investigation is needed. |
As an experiment, can you try manually removing the |
I saw something similar happen in #8216 (comment). I'm going to try to get more information about this, but it looks like the AOT compiler emiting JS for libraries that have TS files. |
@clydin getting more errors by removing index.ts:
|
The library's
|
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. |
@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. |
Just wanted to link another related issue here; #8284. The difference between these two issues that in that #8284 it was user code that was excluded, due to it not being listed in the tsconfig compilation files. In this issue, we're taking about vendor libraries. I added a fix for #8284 in my comment there (#8284 (comment)). It might also work for cases like this, where you have an improperly packaged library, but I must stress that there is no guarantee that improperly packaged libraries will work. |
@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? |
Closing as it looks like it's an issue on how a library is packaged. |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Bug Report or Feature Request (mark with an
x
)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
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
The text was updated successfully, but these errors were encountered: