question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Can't resolve 'hammerjs'

See original GitHub issue

Bug, feature request, or proposal:

Bug

What is the expected behavior?

hammerjs loaded successfully.

What is the current behavior?

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

What are the steps to reproduce?

Just download angular2-webpack-starter, and follow instructions of your GETTING_STARTED.md regarding md-toggle and hammerjs dependency.

What is the use-case or motivation for changing an existing behavior?

I just want this damned material2 start to work with angular2-webpack-starter.

Which versions of Angular, Material, OS, browsers are affected?

  • OS: Debian Jessie
  • Angular: 2.2.1
  • NPM: 1.4.21

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:12 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
holmscommented, Dec 11, 2016

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.

1reaction
JanStureNielsencommented, Dec 13, 2016

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Module not found: Error: Can't resolve 'hammerjs'
To work-around this bug, temporarily add hammerjs to your project: npm install hammerjs --save npm install @types/hammerjs --save-dev.
Read more >
Angular – Module not found: Error: Can't resolve 'hammerjs'
I updated my Angular 2 CLI project from 1.0.0-beta.11-webpack.2 to 1.0.0-beta.11-webpack.8 via ng init . My project uses Angular 2.0.0-rc.5 and Angular ...
Read more >
hammerjs - npm
A javascript library for multi-touch gestures. Latest version: 2.0.8, last published: 7 years ago. Start using hammerjs in your project by ...
Read more >
HammerJS Not Resolving with Webpack - MDBootstrap
Hey, I'm having trouble loading HammerJS when I include mdb.min.js into my ... scripts/lib/mdb.min.js Module not found: Error: Can't resolve 'hammerjs' in ...
Read more >
After update project to Angular 4. Issue material Can't resolve ...
Issue material Can't resolve 'hammerjs'. AngularJS. 05 April 2017 Posted by GigaGyrfalcon. After I update project to angular 4, ng serve shows me...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found