ng-dynamic-component icon indicating copy to clipboard operation
ng-dynamic-component copied to clipboard

Error: Internal error: unknown identifier undefined

Open vigneshbarani24 opened this issue 4 years ago • 7 comments

Hello @gund ,

Thanks for this awesome library,

But i am having a problem in importing this as part of my Angular 9 Project. I explored the issues and i used npm i [email protected] to avoid the pinned issue. But yet still, I am quite stuck with this error during ng serve of my app.

Can you please try helping me out here ?

vigneshbarani24 avatar Jul 02 '20 18:07 vigneshbarani24

Hi, unfortunately I cannot help without an minimal online reproduction example. Could you create one please?

gund avatar Jul 03 '20 09:07 gund

Hey @gund ,

Thanks for the reply. Sure, Let me please try creating a stackblitz and revert back

vigneshbarani24 avatar Jul 03 '20 09:07 vigneshbarani24

Hey @gund ,

Thanks for the reply. Sure, Let me please try creating a stackblitz and revert back

Do you have Ivy build enabled in your tsConfig file?

konuch avatar Aug 07 '20 06:08 konuch

@konuch I do not think it matters as the library can be compiled by the NGCC to Ivy version.

gund avatar Aug 07 '20 08:08 gund

Same issue. Also using the no-barrels. Problem only occurs when using ng build not on ng serve. We use @nrwl.

ERROR in Error: Internal error: unknown identifier undefined at Object.importExpr$1 [as importExpr] (/node_modules/@angular/compiler/bundles/compiler.umd.js:27248:27) at tokenExpr (/node_modules/@angular/compiler/bundles/compiler.umd.js:23809:43) at providerDef (/node_modules/@angular/compiler/bundles/compiler.umd.js:23735:24) at ViewBuilder._visitProviderOrDirective (/node_modules/@angular/compiler/bundles/compiler.umd.js:25246:22) at ViewBuilder._visitProvider (/node_modules/@angular/compiler/bundles/compiler.umd.js:25208:40) at /node_modules/@angular/compiler/bundles/compiler.umd.js:25070:27 at Array.forEach () at ViewBuilder._visitElementOrTemplate (/node_modules/@angular/compiler/bundles/compiler.umd.js:25057:27) at ViewBuilder.visitElement (/node_modules/@angular/compiler/bundles/compiler.umd.js:24977:27) at ElementAst.visit (/node_modules/@angular/compiler/bundles/compiler.umd.js:12025:28) at visit (/node_modules/@angular/compiler/bundles/compiler.umd.js:12203:41) at /node_modules/@angular/compiler/bundles/compiler.umd.js:12205:29 at Array.forEach () at templateVisitAll (/node_modules/@angular/compiler/bundles/compiler.umd.js:12204:14) at ViewBuilder.visitAll (/node_modules/@angular/compiler/bundles/compiler.umd.js:24851:13) at ViewCompiler.compileComponent (/node_modules/@angular/compiler/bundles/compiler.umd.js:24789:21)

L-X-T avatar Sep 10 '20 09:09 L-X-T

@gund I provided a reproduction here https://github.com/gund/ng-dynamic-component/issues/408 We are also using @nrwl but I doubt that's the cause because I think ng build bypasses nrwl build commands.

willyboy avatar Oct 23 '20 19:10 willyboy

@L-X-T do you have ivy disabled? We do and it seems like with Ivy enabled there isn't an issue.

willyboy avatar Oct 23 '20 19:10 willyboy

I'm closing this issue as it's outdated. If you want to reopen the discussion please feel free to open a new issue.

gund avatar Aug 28 '22 01:08 gund