ngSemantic icon indicating copy to clipboard operation
ngSemantic copied to clipboard

AoT compilation fails with ngSemantic

Open kraiovsky opened this issue 7 years ago • 19 comments

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

kraiovsky avatar Sep 17 '16 17:09 kraiovsky

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?

vladotesanovic avatar Sep 18 '16 08:09 vladotesanovic

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.

kraiovsky avatar Sep 18 '16 08:09 kraiovsky

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

kraiovsky avatar Sep 19 '16 06:09 kraiovsky

Having same problem with Webpack 2 and AoT

arsenys avatar Oct 11 '16 19:10 arsenys

@arsenys by any chance, any success with compiling it?

kraiovsky avatar Oct 20 '16 19:10 kraiovsky

@vladotesanovic Any update on this?

prayagmk avatar Oct 24 '16 13:10 prayagmk

I am also getting the same. @vladotesanovic You got any solution?

anil1712 avatar Oct 26 '16 16:10 anil1712

@vladotesanovic Still happens, just checked... :(

arsenys avatar Oct 27 '16 19:10 arsenys

Yeah, So you are going to look into it?

anil1712 avatar Oct 28 '16 05:10 anil1712

Don't write +1 please, there is a github feature for that 😉

nimaen avatar Oct 31 '16 18:10 nimaen

Same problem for me. trying to do aot compilation with ngSemantic, getting error as TS

fpmk avatar Jan 07 '17 15:01 fpmk

I guess this is the same issue than #156 and #105

enavarro222 avatar Feb 24 '17 20:02 enavarro222

Has someone found a workaround for this ?

I'm considering removing ng-semantic because it no longer works with latest angular-cli rc :(

patriceo avatar Mar 16 '17 10:03 patriceo

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.

mkndn avatar Mar 25 '17 10:03 mkndn

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!

gobeli avatar Mar 31 '17 18:03 gobeli

That didn't work for me, @gobeli

Getting errors like Property 'isInsideForm' is private and only accessible within class 'SemanticInputComponent'.

adamk33n3r avatar Apr 21 '17 07:04 adamk33n3r

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

pieperu avatar Aug 19 '17 19:08 pieperu

You could look at a similar alternative library which works with aot and doesn't use jquery. https://edcarroll.github.io/ng2-semantic-ui/

trevordaniels avatar Aug 19 '17 22:08 trevordaniels

This is an excellent alternative, thank you

pieperu avatar Aug 20 '17 00:08 pieperu