Skip to content

Infragistics Community Forum / Web / Ignite UI for Angular / ReferenceError: Hammer is not defined when upgrading from Angular 10 to 11

ReferenceError: Hammer is not defined when upgrading from Angular 10 to 11

New Discussion
Nick Cook
Nick Cook asked on Feb 22, 2021 4:44 PM

Hi,

I have just upgraded our Angular Igniteui project from Angular v10.0.14 to v11.2.1 and igniteui from v10.0.6 to v11.0.14

Everything works as expected apart from the Hammer error we are now getting.

The error is raised in every component that has an IgxNavigationDrawerComponent and fails to load the component see attached screen shot.

Thanks.

Sign In to post a reply

Replies

  • 0
    Martin Asenov
    Martin Asenov answered on Feb 22, 2021 4:44 PM

    Hi Nick,

    Thank you for posting in our community.

    I have created and attached a sample project based on the provided information trying to reproduce your issue. On my side, everything works as excepted. The migration process runs without any errors when IgxNavigationDrawerComponent is used in the project. Here are the steps I have made:

    1. Install the specified version of Angular’s CLI: npm i @angular/cli@10.0.4
    2. Create new angular project: ng new hammer-library-issue –style=scss –skip-tests
    3. Add igniteui-angular package: ng add igniteui-angular@10.0.6
    4. Add HammerModule in app.module.ts
    5. Create a component that uses the IgxNavigationDrawerComponent
    6. Update igniteui-angular to the licensed version by replacing igniteui-angular with @infragistics/igniteui-angular in the package package.json file
    7. Make additional changes in the project source specified in this help topic
    8. Run npm i
    9. Run ng server to confirm everything is working as expected
    10. Stop the dev server
    11. Run ng update @angular/cli@11.2.1
    12. Run ng update @infragistics/igniteui-angular@11.0.14
    13. Run ng serve

    Please compare the project structure with yours and try to replicate your issue. Additionally, it would be helpful If you could share the contents of the following files:

    • main.ts
    • test.ts
    • index.html
    • angular.json
    • package.json
    • app.module.ts
    • tsconfig.app.json

    What I can suggest as well is to take a look at this forum post where a similar query has been asked.

    Looking forward to hearing from you.

    Attachments:
  • You must be logged in to reply to this topic.
Discussion created by
Favorites
Replies
Created On
Last Post
Discussion created by
Nick Cook
Favorites
0
Replies
1
Created On
Feb 22, 2021
Last Post
5 years, 6 months ago

Suggested Discussions

Created by

Created on

Feb 22, 2021 4:44 PM

Last activity on

Feb 19, 2026 2:47 PM