Bug
hammerjs loaded successfully.
frontend_1 | ERROR in ./src/app/app.module.ts
frontend_1 | Module not found: Error: Can't resolve 'hammerjs' in '/frontend/src/app'
frontend_1 | @ ./src/app/app.module.ts 2:0-19
frontend_1 | @ ./src/app/index.ts
frontend_1 | @ ./src/main.browser.ts
frontend_1 | @ multi main
frontend_1 | Child html-webpack-plugin for "index.html":
frontend_1 | chunk {0} index.html 542 kB [entry]
frontend_1 | + 4 hidden modules
Just download angular2-webpack-starter, and follow instructions of your GETTING_STARTED.md regarding md-toggle and hammerjs dependency.
I just want this damned material2 start to work with angular2-webpack-starter.
Are you sure you followed everything?
You need to run this:
npm install --save hammerjs
npm install --save-dev @types/hammerjs
Afterwards you have to add import 'hammerjs'; in you app's main module. Finally you should add the following to your tsconfig.json.
{
"compilerOptions": {
"types": [
"hammerjs"
]
}
}
Just download angular2-webpack-starter and try yourself.
After doing this:
npm install --save hammerjs
npm install --save-dev @types/hammerjs
tsconfig.json already contains hammerjs in types. import 'hammerjs'; is at the first line of app main module file.
@JanStureNielsen have you at least noticed my comment on that stackoverflow topic? mm..? please don't throw generic solutions, because there's none. Download this: https://github.com/AngularClass/angular2-webpack-starter/ do instructions from that stackoverflow topic you gave me, and enjoy error which pop ups in console :) I've reported this bug, because obviously those instructions produces that error, not because lack of those instructions...
@holms -- you submitted an issue in the angular/material2 project (this project) but your comment above references the AngularClass/angular2-webpack-starter project (not this project). Are you having problems when you follow these instructions:
https://github.com/AngularClass/angular2-webpack-starter
or when you follow this project's instructions:
https://github.com/angular/material2/blob/master/GETTING_STARTED.md
or both? In your submission you say: "Just download angular2-webpack-starter, and follow instructions of your GETTING_STARTED.md ". This is not the angular2-webpack-starter project so, presumably when you say "and...your GETTING_STARTED.md" you mean that you're trying to follow both. Is that right? If you're just following the former, please open an issue in the AngularClass/angular2-webpack-starter project...
I have a problem for
https://github.com/angular/material2/blob/master/GETTING_STARTED.md
On Mon, 12 Dec 2016 at 12:02, Jan Nielsen notifications@github.com wrote:
@holms https://github.com/holms -- you submitted an issue in the
angular/material2 project (this project) but your comment above
references the AngularClass/angular2-webpack-starter project (not this
project). Are you having problems when you follow these instructions:https://github.com/AngularClass/angular2-webpack-starter
or when you follow this project's instructions:
https://github.com/angular/material2/blob/master/GETTING_STARTED.md
For the former, please open an issue in the
AngularClass/angular2-webpack-starter project...—
You are receiving this because you were mentioned.Reply to this email directly, view it on GitHub
https://github.com/angular/material2/issues/2172#issuecomment-266333202,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AARJfgK2ndKeYpg4JGJ3tEhhiPy0p1iAks5rHLk5gaJpZM4LJ6Zk
.
What do the following commands show, @holms:
ng --version
npm --version
@JanStureNielsen I don't use ng
$ npm --version
3.10.9
Angular2-webpack-starter is just a simple webpack configuration which you can do yourself, and you're probably doing it every time if you're using webpack. So it's not much difference in here at all if it's angular2-webpack-starter or it's not a starter.
@holms -- this project's GETTING_STARTED.md starts with installing Angular CLI and uses it throughout; so, you're not following this project's GETTING_STARTED.md. As noted in this project's CONTRIBUTING.md document, support questions should be directed to StackOverflow -- I suggest you do just that and add a plunker reproducing your problem...and you might consider using Angular CLI, at least to get started.
Basically what you're saying is that this project doesn't support webpack. Or atleast it's not documented, which seems wrong to me. Most of angular2 tutorials using webpack.. so I'm not interested to use angular-cli which in 90% of tutorials using system.js instead of webpack
No, @holms -- that's not what I'm saying at all. I'm using Angular 2, Angular 2 Material, Angular CLI and webpack in my project and it's working very nicely. Try Angular CLI -- it'll be well worth your time to at least get something up and running.
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
Just download angular2-webpack-starter and try yourself.
After doing this:
tsconfig.jsonalready contains hammerjs in types.import 'hammerjs';is at the first line of app main module file.