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

Hammer.js is not loaded #52

Open
vlodkow opened this issue Jun 28, 2017 · 6 comments
Open

Hammer.js is not loaded #52

vlodkow opened this issue Jun 28, 2017 · 6 comments

Comments

@vlodkow
Copy link

vlodkow commented Jun 28, 2017

When try to use Hummer.js on demand-express example get error from NodeJS: Error: Hammer.js is not loaded, can not bind swipeleft event

@ktersius
Copy link

ktersius commented Sep 5, 2017

Got the same thing today.

ERROR Error: Hammer.js is not loaded, can not bind swipeleft event
at HammerGesturesPlugin.supports (...node_modules@angular\platform-browser\bundles\platform-browser.umd.js:3208:19)
at EventManager.findPluginFor (...packages\platform-browser\src\dom\events\event_manager.ts:80:1)
at EventManager.addEventListener (...node_modules@angular\platform-browser\bundles\platform-browser.umd.js:2430:44)
at EmulatedEncapsulationDomRenderer2.DefaultDomRenderer2.listen (...node_modules@angular\platform-browser\bundles\platform-browser.umd.js:2952:36)
at BaseAnimationRenderer.module.exports.BaseAnimationRenderer.listen (...dist-server\index.js:36400:30)
at listenToElementOutputs (...node_modules@angular\core\bundles\core.umd.js:9232:66)
at createViewNodes (...node_modules@angular\core\bundles\core.umd.js:12191:17)
at callViewAction (...node_modules@angular\core\bundles\core.umd.js:12665:13)
at execComponentViewsAction (...node_modules@angular\core\bundles\core.umd.js:12574:13)
at createViewNodes (...node_modules@angular\core\bundles\core.umd.js:12246:5)
at Object.createEmbeddedView (...node_modules@angular\core\bundles\core.umd.js:12102:5)
at TemplateRef
.createEmbeddedView (...node_modules@angular\core\bundles\core.umd.js:10298:38)
at ViewContainerRef_.createEmbeddedView (...node_modules@angular\core\bundles\core.umd.js:10075:52)
at NgIf._updateView (...packages\common\src\directives\ng_if.ts:159:1)
at NgIf.set [as ngIf] (...node_modules@angular\common\bundles\common.umd.js:1933:18)
at updateProp (...packages\core\src\view\provider.ts:569:1)

@clbond
Copy link
Contributor

clbond commented Sep 19, 2017

Hmmm, strange. I am unable to reproduce. demand-express most certainly imports hammerjs. In main.ts:

import 'hammerjs';

Did you make any local changes?

@JinSY
Copy link

JinSY commented Sep 21, 2017

@clbond I did a little digging since we were running into some similar issues. I wasn't able to reproduce in the demand-express example but I was able to reproduce in the cli example as well as another barebones cli project with angular-ssr. Just attach a swipe event to an element and it'll throw this error

@clbond
Copy link
Contributor

clbond commented Oct 21, 2017

Did you import hammerjs? There's no reason it shouldn't work

@mrinaljain
Copy link

Make sure you are using import 'hammerjs';
and not using import { hammerjs } from "path to hammer js";

@dxm99
Copy link

dxm99 commented Aug 1, 2020

Make sure you are using import 'hammerjs';
and not using import { hammerjs } from "path to hammer js";

Unless you use custom baseUrl and path. Then you will have to use import '../node_modules/hammerjs';

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants