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 compilation failed #61

Open
gepisolo opened this issue Jul 19, 2017 · 1 comment
Open

AOT compilation failed #61

gepisolo opened this issue Jul 19, 2017 · 1 comment

Comments

@gepisolo
Copy link

gepisolo commented Jul 19, 2017

Hi, I've this project structure

  • app.module
    --template.module (only available if people login)
    --auth.module (login component)

I put in the shared.module
`@NgModule({
imports: [],
exports: [
CommonModule,
NgSlimScrollModule
],
declarations: []
})
export class SharedModule {

}`

and then I import the shared.module only in template.module. No problem with ng serve.

When I try to compile with: ng build --aot it fails with

ERROR in Can't export value NgSlimScrollModule in S:/app/node_modules/ngx-slimscroll/index.d.ts from SharedModule in S:/app/src/app/shared/shared.module.ts as it was neither declared nor imported!

ERROR in ./src/main.ts
Module not found: Error: Can't resolve './$$_gendir/app/app.module.ngfactory' in 'S:\app\src'
@ ./src/main.ts 4:0-74
@ multi ./src/main.ts

My Environment:

"dependencies": { "@angular/animations": "^4.1.0", "@angular/common": "^4.1.0", "@angular/compiler": "^4.1.0", "@angular/core": "^4.1.0", "@angular/forms": "^4.1.0", "@angular/http": "^4.1.0", "@angular/platform-browser": "^4.1.0", "@angular/platform-browser-dynamic": "^4.1.0", "@angular/router": "^4.1.0",

@rajjaiswalsaumya
Copy link

any update on this ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants