Skip to content
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

AoT 1.1.0 Unexpected value 'ToasterModule' imported by the module 'AppModule' #89

Closed
philjones88 opened this issue Dec 20, 2016 · 2 comments

Comments

@philjones88
Copy link

philjones88 commented Dec 20, 2016

Looks to be the same as #55

I'm using:

TS 2.0.10
NG 2.3.1
Angular2-toaster 1.1.0

$ rm -rf aot && yarn run ngc
yarn run v0.17.10
$ ngc -p tsconfig.aot.json
Error: Unexpected value 'ToasterModule' imported by the module 'AppModule'
    at /Users/phil/Documents/Projects/node_modules/@angular/compiler/bundles/compiler.umd.js:17768:46
    at Array.forEach (native)
    at CompileMetadataResolver.getNgModuleMetadata (/Users/phil/Documents/Projects/node_modules/@angular/compiler/bundles/compiler.umd.js:17753:51)
    at addNgModule (/Users/phil/Documents/Projects/node_modules/@angular/compiler/bundles/compiler.umd.js:24349:60)
    at /Users/phil/Documents/Projects/node_modules/@angular/compiler/bundles/compiler.umd.js:24360:16
    at Array.forEach (native)
    at _createNgModules (/Users/phil/Documents/Projects/node_modules/@angular/compiler/bundles/compiler.umd.js:24359:28)
    at analyzeNgModules (/Users/phil/Documents/Projects/node_modules/@angular/compiler/bundles/compiler.umd.js:24238:16)
    at analyzeAndValidateNgModules (/Users/phil/Documents/Projects/node_modules/@angular/compiler/bundles/compiler.umd.js:24248:37)
    at AotCompiler.compileAll (/Users/phil/Documents/Projects/node_modules/@angular/compiler/bundles/compiler.umd.js:23987:20)
Compilation failed
error Command failed with exit code 1.

Mostly following the official AoT cookbook at https://angular.io/docs/ts/latest/cookbook/aot-compiler.html

@cedricduffournet
Copy link

cedricduffournet commented Dec 20, 2016

An issue has already been created see: #87

Linking directly to angular2-toaster/lib/toaster.module allows the application to be consumed by AoT.

@Stabzs
Copy link
Owner

Stabzs commented Dec 20, 2016

@philjones88 this is a duplicate of #87 . A permanent fix is being worked on and in the meantime, you can use the workaround noted in that issue as cedric called out.

@Stabzs Stabzs closed this as completed Dec 20, 2016
@Stabzs Stabzs mentioned this issue Dec 22, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants