I am using the latest angular-cli@webpack. I am getting an error that prevents displaying of my app but without any helpful pointers to where the problem is in my application
url_resolver.js:238Uncaught TypeError: uri.match is not a function(…)_split @ url_resolver.js:238getUrlScheme @ url_resolver.js:80componentModuleUrl @ metadata_resolver.js:751CompileMetadataResolver.getDirectiveMetadata @ metadata_resolver.js:156(anonymous function) @ metadata_resolver.js:268CompileMetadataResolver.getNgModuleMetadata @ metadata_resolver.js:261(anonymous function) @ metadata_resolver.js:253CompileMetadataResolver.getNgModuleMetadata @ metadata_resolver.js:240RuntimeCompiler._compileComponents @ runtime_compiler.js:152RuntimeCompiler._compileModuleAndComponents @ runtime_compiler.js:74RuntimeCompiler.compileModuleAsync @ runtime_compiler.js:51PlatformRef_._bootstrapModuleWithZone @ application_ref.js:369PlatformRef_.bootstrapModule @ application_ref.js:362(anonymous function) @ main.ts:10__webpack_require__ @ bootstrap 6146691…:52(anonymous function) @ environment.dev.ts:4__webpack_require__ @ bootstrap 6146691…:52webpackJsonpCallback @ bootstrap 6146691…:23(anonymous function) @ main.bundle.js:1
Hope someone can help.
Thanks
@st-clair-clarke there's not enough information here to investigate your problem. Please follow the issue template.
Why would this be closed? I am getting the same error because I also use the webpack version of the angular cli. The problem is moduleIds in angular2 material are numbers and do not have the match function required. It seems angular2 material is entirely incompatible with web pack and the future angular cli based on webpack.
Looks like is closed because the lack of organization, I'm mean looks like the issue is not following the rules, but the error is present, I'm also having this issue, I migrated using the NgModules but nothing seems to work.
Since RC5 everything seems to stopped working and I'm still not sure if it really is a material2 issue or it is an angular2 RC5 issue.
I will keep trying to find what is causing this.
Cheers
Jon
We'll definitely be supporting the webpack CLI by the time it is moved to the @latest label, but it is currently still pre-release and the moduleIds are necessary for the previous version of the CLI.
Angular2 RC5 with Material 2.0.0-alpha6 works - as long as you leave everything as is, i.e. no refactoring to NgModules etc. in your existing code. Update to Material 2.0.0-alpha.7-2 and everything goes down the drain. Refactor your existing code: ditto, everything goes down the drain. (Edit: only works if you apply this patch )
And quite frankly I'm waiting this one out. I've already wasted enough time and am sure the great Angular/Material Team will get it all sorted out - in time. (Sorry guys, you goofed on this one.)
(Standard Webpack - not angular cli - build, no mangle, no minify, no func-rename. And everything worked before updating.)
@RAlfoeldi Could you file an issue with your information? Nobody has filed an issue about standalone webpack not working.
@jelbourn After investing some more hours writing up a new issue, it turns out Material2 is not to blame. I went down the rabbit hole again. Angular2 RC5 and Material 2.0.0-alpha.7-3 work with webpack (pure, not angular-cli) after applying the mentioned patch.
If you then start refactoring your application to use NgModules you get to
Can't bind to 'ngForOf' since it isn't a known property of 'md-list-item'.
Changing the HMTL from <md-list-item>to <li>produces the same error - so it isn't Material2.
@RAlfoeldi sounds like you're missing CommonModule from the component in which you're using ngForOf.
@jelbourn Thanks for the tip... I eventually figured that out :-)
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
_This action has been performed automatically by a bot._
Most helpful comment
We'll definitely be supporting the webpack CLI by the time it is moved to the
@latestlabel, but it is currently still pre-release and the moduleIds are necessary for the previous version of the CLI.