You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I just started a new project and I did everything as is in the GETTING_STARTED.md
After I did npm install --save @angular/material
I got:
angular@0.0.0 /path
├── UNMET PEER DEPENDENCY @angular/common@2.0.0
├── UNMET PEER DEPENDENCY @angular/compiler@2.0.0
├── UNMET PEER DEPENDENCY @angular/core@2.0.0
├── @angular/material@2.0.0-alpha.9-3
└── UNMET PEER DEPENDENCY @angular/platform-browser@2.0.0
npm WARN @angular/compiler-cli@0.6.3 requires a peer of @angular/compiler@2.0.1 but none was installed.
npm WARN @angular/compiler-cli@0.6.3 requires a peer of @angular/core@2.0.1 but none was installed.
npm WARN @angular/platform-server@2.0.1 requires a peer of @angular/core@2.0.1 but none was installed.
npm WARN @angular/platform-server@2.0.1 requires a peer of @angular/common@2.0.1 but none was installed.
npm WARN @angular/platform-server@2.0.1 requires a peer of @angular/compiler@2.0.1 but none was installed.
npm WARN @angular/platform-server@2.0.1 requires a peer of @angular/platform-browser@2.0.1 but none was installed.
And when I did ng serve I got:
ERROR in [default] /path/node_modules/@angular/material/core/gestures/MdGestureConfig.d.ts:4:39
Cannot find name 'HammerManager'.
ERROR in [default] /path/node_modules/@angular/material/slide-toggle/slide-toggle.d.ts:68:19
Cannot find name 'HammerInput'.
ERROR in [default] /path/node_modules/@angular/material/slider/slider.d.ts:61:19
Cannot find name 'HammerInput'.
ERROR in [default] /path/node_modules/@angular/material/slider/slider.d.ts:63:24
Cannot find name 'HammerInput'.
I tried to install npm install hammerjs, but it doesn't work also.
Well, it's a little bit strange.. first of all I think I don't need add hammerjs since I wasn't using any component yet, and in GETTING_STARTED.md says clearly I just need to add it if I use md-slide-toggle and md-slider. However I installed as I mentioned npm install hammerjs, but it still also gives me error.
Now the problem is solved using the suggestion given by @slmyers, but why is it necessary? If I'm not even using none of the modules that required hammerjs?
Also, the UNMMEET PEER DEPENDENCY warning is still here, and I think there's a problem because if I simply add, for example the following:
Activity
spock123 commentedon Sep 30, 2016
Just a quick question: did you use npm 3?
I just installed 9-3 without issues (nvm 3, Angular 2.0.1)
slmyers commentedon Sep 30, 2016
try
npm install @types/hammerjscre8 commentedon Sep 30, 2016
Restarting the server (
ng serve) and adding types helped me.rafaelss95 commentedon Sep 30, 2016
@spock123, Yes I'm using the version 3.10.8.
Well, it's a little bit strange.. first of all I think I don't need add
hammerjssince I wasn't using any component yet, and in GETTING_STARTED.md says clearly I just need to add it if I usemd-slide-toggleandmd-slider. However I installed as I mentionednpm install hammerjs, but it still also gives me error.Now the problem is solved using the suggestion given by @slmyers, but why is it necessary? If I'm not even using none of the modules that required
hammerjs?Also, the
UNMMEET PEER DEPENDENCYwarning is still here, and I think there's a problem because if I simply add, for example the following:It comes without any style..
spock123 commentedon Sep 30, 2016
@rafaelss95 don't worry about the dependency stuff.. it's just npm3 telling you about them.. it's nothing to worry about afaik...
I think hammer.js is needed by Material-core now, but I'm not sure about this.. just install it to be sure :)
rafaelss95 commentedon Sep 30, 2016
Hmm, thanks for all helpful information.
Can you tell me what's the problem with this simple example:
It's displaying without colors.
Do I need to do something more than it to make it work? In my ts file, for example?
dahaupt commentedon Sep 30, 2016
@rafaelss95 I think you have to include a theme or write your own. Check the theming.md in the docs folder for more information.
vinagreti commentedon Sep 30, 2016
You can see in this PR #1385 how to use themes to customize your own components.
angular-automatic-lock-bot commentedon Sep 5, 2019
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.