0

I get the following error when I try to add a npm package to my Angular library.

 Metadata collected contains an error that will be reported at runtime: Lambda not supported.
  {"__symbolic":"error","message":"Lambda not supported","line":12,"character":20}
    at Object.getOwnPropertyNames.forEach.name (C:\projects\Foundation\New folder\rate-grid-ui\node_modules\@angular\compiler-cli\src\metadata\collector.js:648:31)
    at Array.forEach (<anonymous>)
    at validateMetadata (C:\projects\Foundation\New folder\rate-grid-ui\node_modules\@angular\compiler-cli\src\metadata\collector.js:636:46)
    at MetadataCollector.getMetadata (C:\projects\Foundation\New folder\rate-grid-ui\node_modules\@angular\compiler-cli\src\metadata\collector.js:492:21)
    at MetadataCache.getMetadata (C:\projects\Foundation\New folder\rate-grid-ui\node_modules\@angular\compiler-cli\src\transformers\metadata_cache.js:59:43)
    at Object.getSourceFileMetadata (C:\projects\Foundation\New folder\rate-grid-ui\node_modules\@angular\compiler-cli\src\transformers\compiler_host.js:110:55)
    at Object.readMetadata (C:\projects\Foundation\New folder\rate-grid-ui\node_modules\@angular\compiler-cli\src\transformers\metadata_reader.js:45:39)
    at TsCompilerAotCompilerTypeCheckHostAdapter.getMetadataFor (C:\projects\Foundation\New folder\rate-grid-ui\node_modules\@angular\compiler-cli\src\transformers\compiler_host.js:466:38)
    at StaticSymbolResolver.getModuleMetadata (C:\projects\Foundation\New folder\rate-grid-ui\node_modules\@angular\compiler\bundles\compiler.umd.js:23164:49)
    at StaticSymbolResolver.hasDecorators (C:\projects\Foundation\New folder\rate-grid-ui\node_modules\@angular\compiler\bundles\compiler.umd.js:22922:33)
    at analyzeFile (C:\projects\Foundation\New folder\rate-grid-ui\node_modules\@angular\compiler\bundles\compiler.umd.js:24332:50)
    at AotCompiler._analyzeFile (C:\projects\Foundation\New folder\rate-grid-ui\node_modules\@angular\compiler\bundles\compiler.umd.js:23729:21)
    at C:\projects\Foundation\New folder\rate-grid-ui\node_modules\@angular\compiler\bundles\compiler.umd.js:23824:74
    at Array.map (<anonymous>)
    at AotCompiler.loadFilesAsync (C:\projects\Foundation\New folder\rate-grid-ui\node_modules\@angular\compiler\bundles\compiler.umd.js:23824:35)
    at Promise.resolve.then (C:\projects\Foundation\New folder\rate-grid-ui\node_modules\@angular\compiler-cli\src\transformers\program.js:181:38)

I read somewhere this is due to AOT compilation and it doesn't support lambda functions.

Michael D
  • 20,838
  • 4
  • 12
  • 37
Akshay
  • 73
  • 1
  • 13
  • You need to provide more details. What package were you trying to install? Were you installing in global workspace or local workspace? – Michael D Apr 30 '20 at 19:41
  • I am running it locally. It is an angular library that i am creating from scratch. The Angular library depends on other npm packages. Some of them created by me. When i try to add one of the npm packages to the angular library i get this error – Akshay Apr 30 '20 at 19:50
  • Have you checked this before https://stackoverflow.com/questions/57594723/angular-metadata-collected-contains-an-error-that-will-be-reported-at-runtime? – Michael D Apr 30 '20 at 19:52
  • Yes, I did but since it is a npm package and not my own code I cant make changes to the function. – Akshay Apr 30 '20 at 19:54
  • Could you please say the package in context here? Then it might be easier because if this is a package specific error, chances are someone else would've encountered it before you. – Michael D Apr 30 '20 at 19:56
  • It is a package created by someone else in within my organization not a public package – Akshay Apr 30 '20 at 19:57
  • Better way would be to discuss it with the people responsible. – Michael D May 01 '20 at 07:31

0 Answers0