Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Angular 2 material strange core errors (gesture) when build #1151

Closed
theunreal opened this issue Sep 1, 2016 · 13 comments
Closed

Angular 2 material strange core errors (gesture) when build #1151

theunreal opened this issue Sep 1, 2016 · 13 comments

Comments

@theunreal
Copy link

Bug, feature request, or proposal:

Bug

image

Everything is installed exactly as documented

@spock123
Copy link

spock123 commented Sep 1, 2016

ComponentResolver is deprecated in RC6
Use ComponentFactoryResolver instead.

I'm pretty sure we'll see a new Material2-build any time, fixing this...

@ghost
Copy link

ghost commented Sep 1, 2016

I also encountered this error. Hope this gets fixed quickly, I really don't want to revert angular again :/

@spock123
Copy link

spock123 commented Sep 1, 2016

These are the errors I've found so far:
According to the Ng2 changelog (https://github.com/angular/angular/blob/master/CHANGELOG.md):

Type is now Type which means that in most cases you have to use Type in place of Type.

@angular2-material/button/button.d.ts:34:44 Generic type 'Type<T>' requires 1 type argument(s).

core: deprecated ComponentResolver was removed. Please use ComponentFactoryResolver instead.

`@angular2-material/core/overlay/overlay.d.ts:1:10  Module '"/project/node_modules/@angular/core/index"' has no exported member 'ComponentResolver'.

@angular2-material/core/portal/dom-portal-host.d.ts:1:10 Module '"/project/node_modules/@angular/core/index"' has no exported member 'ComponentResolver'.

@angular2-material/core/portal/portal-directives.d.ts:1:37 
    Module '"/project/node_modules/@angular/core/index"' has no exported member 'ComponentResolver'.

`

@ghost
Copy link

ghost commented Sep 1, 2016

Updating @angular2-material/* from 2.0.0-alpha.7-4 to 2.0.0-alpha.7-12 fixes this problem, but re-introduces the moduleid bug (at least on webpack). They were added again with #1101, resulting in errors like uri.match is not a function

@spock123
Copy link

spock123 commented Sep 1, 2016

@christiandreher Yeah, module.id breaks webpack builds.. 👎

I think I saw someone had done a webpack-loader which stripped component. module.id's... don't remember where...

@orangesoup
Copy link

Yeah, getting moduleId out makes it "work" until you get another error: No provider for Overlay!. I added PortalModule and OverlayModule, yet for some reason it doesn't work.

@fxck
Copy link
Contributor

fxck commented Sep 1, 2016

You can use NamedModulesPlugin(included in webpack2) or this to get rid of that module.id caused error. As for No provider for Overlay! I got rid of it as soon as I used MdMenuModule.forRoot() on my root module. Here's a list of components that needs to be included in your root module.

@theunreal theunreal reopened this Sep 1, 2016
@spock123
Copy link

spock123 commented Sep 2, 2016

@fxck Thanks, couldn't remember the plugin name. Will give it a shot...

@ghost
Copy link

ghost commented Sep 2, 2016

As an angular-cli user, I'm afraid that I can't configure webpack... Hope that this will be fixed very soon...

@jelbourn
Copy link
Member

I believe this issue is obsolete now.

@ghost
Copy link

ghost commented Oct 21, 2016

it is indeed

@gilad-vatbox
Copy link

Using angular 2.2.3 I'm still getting this error in build time.
Tried adding OVERLAY_PROVIDERS to the providers with no change.

@angular-automatic-lock-bot
Copy link

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.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants