TypeError: _angular_core.ɵmerge is not a function
Was trying your seed and edited seed.config.ts and added two lines relating to @angular/material (seed I get this error but no compile warnings or errors. And the umd file specified exists and is latest. This isn't a bug just simply can't get it working following your wiki steps for adding external dependencies though I just edited seed not project .. project.config.ts gave me other issues relating to angular/material so I tried just editing seed lightly to include what I needed.
here I just added two statements relating to material per wiki: (here's my conf seed.config.ts https://pastebin.com/abWLb2Dr) and here's browser error (index):68 (SystemJS)
_angular_core.ɵmerge is not a function
TypeError: _angular_core.ɵmerge is not a function
at DirectiveResolver._merge (http://new.thejoyhouse.com/angular-seed/dist/dev/node_modules/@angular/compiler/bundles/compiler.umd.js:13155:74)
at DirectiveResolver._mergeWithPropertyMetadata (http://new.thejoyhouse.com/angular-seed/dist/dev/node_modules/@angular/compiler/bundles/compiler.umd.js:13118:21)
at DirectiveResolver.resolve (http://new.thejoyhouse.com/angular-seed/dist/dev/node_modules/@angular/compiler/bundles/compiler.umd.js:13054:29)
at CompileMetadataResolver.getNonNormalizedDirectiveMetadata (http://new.thejoyhouse.com/angular-seed/dist/dev/node_modules/@angular/compiler/bundles/compiler.umd.js:13766:64)
at CompileMetadataResolver._getEntryComponentMetadata (http://new.thejoyhouse.com/angular-seed/dist/dev/node_modules/@angular/compiler/bundles/compiler.umd.js:14468:45)
at eval (http://new.thejoyhouse.com/angular-seed/dist/dev/node_modules/@angular/compiler/bundles/compiler.umd.js:14043:53)
at Array.map (native)
at CompileMetadataResolver.getNgModuleMetadata (http://new.thejoyhouse.com/angular-seed/dist/dev/node_modules/@angular/compiler/bundles/compiler.umd.js:14043:18)
at CompileMetadataResolver.getNgModuleSummary (http://new.thejoyhouse.com/angular-seed/dist/dev/node_modules/@angular/compiler/bundles/compiler.umd.js:13893:52)
at eval (http://new.thejoyhouse.com/angular-seed/dist/dev/node_modules/@angular/compiler/bundles/compiler.umd.js:13966:72)
at Array.forEach (native)
at CompileMetadataResolver.getNgModuleMetadata (http://new.thejoyhouse.com/angular-seed/dist/dev/node_modules/@angular/compiler/bundles/compiler.umd.js:13951:49)
at CompileMetadataResolver.getNgModuleSummary (http://new.thejoyhouse.com/angular-seed/dist/dev/node_modules/@angular/compiler/bundles/compiler.umd.js:13893:52)
at eval (http://new.thejoyhouse.com/angular-seed/dist/dev/node_modules/@angular/compiler/bundles/compiler.umd.js:13966:72)
at Array.forEach (native)
Evaluating http://new.thejoyhouse.com/angular-seed/dist/dev/app/main.js
Error loading http://new.thejoyhouse.com/angular-seed/dist/dev/app/main.js Not expecting this error? Report it at https://github.com/mgechev/angular-seed/issues
I had some similar issues with Material. What build are you running? 'npm run build.prod' OR just npm start.
The SYSTEM_CONFIG_DEV config for material looks correct, this is what I have done and works fine. The SYSTEM_BUILDER_CONFIG looks how I did have it but I had to remove the material block to get it working in prod. That's not ideal because it will include more than you might be using but it should get it working.
Not sure what I did to break it but I started over with fresh angular-seed and adding Material per directions and seems ok now. Now I just have an issue of having added hammerjs to project.config.ts and its still saying I haven't added it .. though the line for material worked fine. Strange.
@jimmybillings thanks for the comment! @Cinemacloud it's better to use project.config.ts as you mentioned already in order to allow easier migration to newer versions of the seed.
Just curious @mgechev if your project.config.ts isn't injecting everything like it is material.js but isn't hammerjs.. how would you go about debugging? Mine looks like this .. ... let additionalPackages: ExtendPackages[] = [ { name: '@angular/material', path: 'node_modules/@angular/material/bundles/material.umd.js'}, { name: 'hammerjs', path: 'node_modules/hammerjs/hammer.js'} ]; this.addPackagesBundles(additionalPackages); ...
@Cinemacloud the way you're adding the material library is correct because it's a package, however, you should treat hammerjs like a regular external javascript library, like jQuery for example and add it to the NPM_DEPENDENCIES array like so:
this.NPM_DEPENDENCIES = [ ...this.NPM_DEPENDENCIES, { src: 'hammerjs/hammer.js', inject: 'libs' } ];
That should fix it for you.
Thanks very much for that cruft-defeating insight :)