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

Uncaught Error: Cannot find module '@angular/http' #1574

Closed
DAB0mB opened this issue Oct 23, 2016 · 7 comments
Closed

Uncaught Error: Cannot find module '@angular/http' #1574

DAB0mB opened this issue Oct 23, 2016 · 7 comments

Comments

@DAB0mB
Copy link
Contributor

DAB0mB commented Oct 23, 2016

Uncaught Error: Cannot find module '@angular/http'

When installing @angular/material and importing it the following error is thrown:

Uncaught Error: Cannot find module '@angular/http'

Weird because @angular/http is registered as one of the dependencies, but I double checked the issue just to make sure and still had the same result.

@fxck
Copy link
Contributor

fxck commented Oct 23, 2016

I think having it under dependencies in package.json doesn't actually install it for you, you still have to install it yourself. And it's not necessarily a bug either, it's basically telling you that you forgot to install it, but I guess it should be stated in GETTING_STARTED(that it's required for the icon module). I guess they assumed you wouldn't use angular2 without Http.

@Urigo
Copy link

Urigo commented Oct 23, 2016

why would you need HTTP for icon?

@alsami
Copy link

alsami commented Oct 24, 2016

@Urigo because you are able to load icon-fonts from URIs and you use MdIconRegistry to register them.

https://github.com/angular/material2/tree/99396a47f6c4d12e55c30ab9e6e6a7d02102a3b1/src/lib/icon

@DAB0mB
Copy link
Contributor Author

DAB0mB commented Oct 24, 2016

OK so it just seems like a peerDependency field is needed

@jelbourn
Copy link
Member

jelbourn commented Nov 4, 2016

Fixed in #1579, will be a part of the next release.

@jelbourn jelbourn closed this as completed Nov 4, 2016
@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