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.

Hammerjs not found

See original GitHub issue

I use require.js and materialize.js v0.95.1, and it reports Uncaught Error: Script error for: hammerjs. It seems that you use the jquery.hammer.js which has a dependency with hammerjs.js, but the dependency is not included in the release file.

Issue Analytics

  • State:closed
  • Created 9 years ago
  • Comments:9 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
Ir1dcommented, Nov 13, 2015

When I was using materialize.js for my html in an electron project, the browser showed me with Uncaught ReferenceError: Hammer is not defined. Wonder what I can do to fix this?

I tried to use require('path-to-materialize.js') as I did for jQuery, but it didn’t help.

Perhaps the same problem with https://github.com/Leko/revy/issues/14

Seems that my problem has nothing to do with this one…

Mine was fixed in https://github.com/atom/electron/issues/1655


I required ‘hammer’ manually and fixed.

Added

window.$ = window.jQuery = require('../assets/jquery/jquery-2.1.4.min.js');
window.Hammer = require('../assets/hammer/hammer.min.js');
1reaction
raytaylorlincommented, Feb 5, 2015

dist/js/materialize.js has no hammer.min.js. I have to download and import it manually, that means

<script src="scripts/lib/hammer.min.js"></script>
<script src="scripts/lib/materialize.min.js"></script>

Why not concat the file into the distribution?

Read more comments on GitHub >

github_iconTop Results From Across the Web

javascript - Angular - 'Could not find HammerJS' - Stack Overflow
Certain Angular Material components may not work correctly. I have hammerjs installed and also @angular/material . How do I resolve this issue?
Read more >
HammerJS not found · Issue #323 · Mawi137/ngx-image-cropper
I tried run ngx-image-cropper@3.1.8 with hammerjs@2.0.8. But it still showing hammerjs not found while running on android device.
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 >
Solution working Hammer.js after upgrading to angular 9
I am not sure what i am missing. I am seeing this warning in chrome console - The "swipe" event cannot be bound...
Read more >
Getting Started - Hammer.js
Hammer is a open-source library that can recognize gestures made by touch, mouse and pointerEvents. It doesn't have any dependencies, and it's small,...
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