Skip to content

Restricted in strict mode, js engine: hermes (React Native + Axios 1.0.0) #4998

@tapz

Description

@tapz

Describe the bug

Getting an error with React Native when importing a function from a file, which uses Axios.

Error: Requiring module "src/api/Api.js", which threw an exception: TypeError: Restricted in strict mode, js engine: hermes

To Reproduce

Import a function.

import { logout } from './api/Api';

---

export function logout() {
  return axios.put(endPoint, body, {
      headers: {
        ...Headers,
        ...headers
      }
    });
}

Expected behavior

No errors

Environment

  • Axios Version: 1.0.0
  • Node.js Version: 16
  • OS: MacOS
  • Additional Library Versions: React Native 0.70.2

Additional context/Screenshots

Add any other context about the problem here. If applicable, add screenshots to help explain.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions