Skip to content

Mobile | Android | iOS swipe fails. Uncaught ReferenceError: global is not defined. #48

Closed
@ChrisTomAlx

Description

@ChrisTomAlx

In Angular 6, the build succeeds but the swipe doesn't work and the last card in the stack is shown. But it cannot be interacted with.

On inspect you get the following errors :-

  • Uncaught ReferenceError: global is not defined
  • v is not a function

This helped me solve the issue. So leaving it here for others that run into the same problem.

In your polyfills.ts file (Example location :- E:\temple\tinderapp\app\src) add the following code below the last import statement :-
(window as any).global = window;

If this doesn't work, there are other solutions in the link provided, you can try those as well.

Cheers,
Chris
Neutrinos

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions