angular-umd-dynamic-example icon indicating copy to clipboard operation
angular-umd-dynamic-example copied to clipboard

Error: Unexpected value 'undefined' imported by the module 'sampleModule

Open npmirajkar opened this issue 6 years ago • 2 comments

Hi, The approach you have shown is really what am looking for. however iam facing a problem which am not able to trace and resolved any help to understand will be really great.

I have followed your implementation approach and created a module called sampleModule. This module uses service to pull data. however am stuck with the following error and not able to proceed. I checked this error on stackoverflow question and answers and other possible solution not able to get this error resolved at all.

Error: Unexpected value 'undefined' imported by the module 'sampleModule' at syntaxError (compiler.js:1021) at compiler.js:10589 at Array.forEach (<anonymous>) at CompileMetadataResolver.push../node_modules/@angular/compiler/fesm5/compiler.js.CompileMetadataResolver.getNgModuleMetadata (compiler.js:10558) at JitCompiler.push../node_modules/@angular/compiler/fesm5/compiler.js.JitCompiler._loadModules (compiler.js:23876) at JitCompiler.push../node_modules/@angular/compiler/fesm5/compiler.js.JitCompiler._compileModuleAndAllComponents (compiler.js:23864) at JitCompiler.push../node_modules/@angular/compiler/fesm5/compiler.js.JitCompiler.compileModuleAndAllComponentsAsync (compiler.js:23823) at CompilerImpl.push../node_modules/@angular/platform-browser-dynamic/fesm5/platform-browser-dynamic.js.CompilerImpl.compileModuleAndAllComponentsAsync (platform-browser-dynamic.js:153)

npmirajkar avatar Feb 18 '19 17:02 npmirajkar

Hi can you provide more information on where you'd register the service/module?

lmeijdam avatar Feb 21 '19 10:02 lmeijdam

@npmirajkar were you able to resolve this error? I am getting the same error for a module I am trying to load dynamically.

jaichandra avatar Jun 18 '19 02:06 jaichandra