lmeijdam/angular-umd-dynamic-example

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

Opened this issue · 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)

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

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