Holiday Notice: Support will be provided on a limited scale from December 24th, 2024, to January 2nd, 2025. Happy holidays and a wonderful New Year!


Topic: ERROR ReferenceError: Hammer is not defined

rockrude pro asked 6 years ago


ERROR ReferenceError: Hammer is not defined while running the ssr build using angular universal.

jicee13 pro answered 6 years ago


I know this is old, but here is a working example of how to include hammerjs properly.

import * as Hammer from "hammerjs"; 

is probably the trickiest part. But yeah go through some of the files in my repo and let me know if any of it is confusing.

https://github.com/jicee13/mdbootstrap-example


Arkadiusz Idzikowski staff answered 6 years ago


Dear rockrude and fellah, You can find solution to this problem here: https://stackoverflow.com/questions/49228736/hammer-not-defined-in-angular-universal You might also need to add hammer to whitelist in webpack config. We explain how to do that in our Angular Universal guide. https://mdbootstrap.com/angular/angular-universal/ Best, Arek  

fellah pro answered 6 years ago


The same here, angular v6.0.7 causes:
ERROR ReferenceError: Hammer is not defined



Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Resolved

Specification of the issue

  • ForumUser: Pro
  • Premium support: No
  • Technology: MDB Angular
  • MDB Version: -
  • Device: -
  • Browser: -
  • OS: -
  • Provided sample code: No
  • Provided link: No
Tags