ngSemantic
ngSemantic copied to clipboard
AoT compilation fails with ngSemantic
Hello,
first of all, thank you for a great and helpful job done!
I am trying to compile app for AoT according to the following official guide https://angular.io/docs/ts/latest/cookbook/aot-compiler.html with ngSemantic installed and configured according to your guide.
All works fine in dev mode.
The following issue raises when I do AoT compilation:
Error: Unexpected value 'NgSemanticModule' imported by the module 'AppModule'
at /Users/*****/*****/******/node_modules/@angular/compiler/bundles/compiler.umd.js:14126:37
at Array.forEach (native)
at CompileMetadataResolver.getNgModuleMetadata (/Users/*****/*****/******/node_modules/@angular/compiler/bundles/compiler.umd.js:14111:46)
at /Users/*****/*****/******/node_modules/@angular/compiler/bundles/compiler.umd.js:12952:58
at Array.forEach (native)
at OfflineCompiler.analyzeModules (/Users/*****/*****/******/node_modules/@angular/compiler/bundles/compiler.umd.js:12951:21)
at CodeGenerator.codegen (/Users/*****/*****/******/node_modules/@angular/compiler-cli/src/codegen.js:105:47)
at codegen (/Users/*****/*****/******/node_modules/@angular/compiler-cli/src/main.js:7:81)
at Object.main (/Users/*****/*****/******/node_modules/@angular/tsc-wrapped/src/main.js:30:16)
at Object.<anonymous> (/Users/*****/*****/******/node_modules/@angular/compiler-cli/src/main.js:14:9)
Compilation failed
Ok, to be honest i didn't try AOT, i read about it and i get impression that it is not ready yet. Did you try AOT with other external libraries in your project? That works?
yes, I did.
I don't have many of them at this stage: 'ng2-toastr': 'npm:ng2-toastr', 'ng-semantic': 'npm:ng-semantic', 'ng2-facebook-sdk': 'npm:ng2-facebook-sdk'
Others work fine so far.
Hi Vlado,
just to be clear and know what to do next - are you planning to look into this issue in the nearest time, or it is not a priority yet?
thanks, Roman
Having same problem with Webpack 2 and AoT
@arsenys by any chance, any success with compiling it?
@vladotesanovic Any update on this?
I am also getting the same. @vladotesanovic You got any solution?
@vladotesanovic Still happens, just checked... :(
Yeah, So you are going to look into it?
Don't write +1 please, there is a github feature for that 😉
Same problem for me. trying to do aot compilation with ngSemantic, getting error as TS
I guess this is the same issue than #156 and #105
Has someone found a workaround for this ?
I'm considering removing ng-semantic because it no longer works with latest angular-cli rc :(
Is this issue going to be fixed. I have put in lot of efforts in my app with this plugin. It would be great if this issue is fixed.
There is a nasty workaround. You can get it to work, by referencing the repo in your project instead of the. package.json:
"ng-semantic": "git+https://github.com/vladotesanovic/ngSemantic.git"
And then in the module.ts
import { NgSemanticModule } from 'ng-semantic/ng-semantic';
But like a said it's quite nasty and I don't recommend using it for production!
That didn't work for me, @gobeli
Getting errors like Property 'isInsideForm' is private and only accessible within class 'SemanticInputComponent'.
Is there any news on this? Is there going to be a fix. I'm debating moving away from SemanticUi all together because of this., which is a shame because i really like it as ui framework
You could look at a similar alternative library which works with aot and doesn't use jquery. https://edcarroll.github.io/ng2-semantic-ui/
This is an excellent alternative, thank you