openmobilehub / react-native-omh-auth

https://openmobilehub.github.io/react-native-omh-auth/
Apache License 2.0
0 stars 0 forks source link

Pre-push Hook Fails Due to Missing Module #74

Closed dzuluaga closed 3 weeks ago

dzuluaga commented 3 weeks ago

I'm encountering an issue when trying to push commits from my laptop. The pre-push hook fails to run due to a missing module error. As a workaround, I had to push using the --no-verify flag. However, I would like to understand why this error is occurring in the first place.

Error Details:

FAIL __tests__/App.test.tsx
Test suite failed to run

Cannot find module '@openmobilehub/auth-google' from 'setup-jest.ts'

> 5 | jest.mock('@react-native-async-storage/async-storage', () =>
  |       ^
> 6 |   require('@react-native-async-storage/jest/async-storage-mock')
  |       ^
    at Resolver._throwModNotFoundError (node_modules/jest-resolve/build/resolver.js:427:11)
    at Object.<anonymous> (setup-jest.ts:7:15)

Steps to Reproduce:

  1. Commit any changes locally.
  2. Attempt to push the commit without the --no-verify flag.
  3. Observe the pre-push hook failure due to the missing module.

Expected Behavior: The pre-push hook should run without errors and allow the commit to be pushed successfully.

Actual Behavior: The pre-push hook fails with the following error:

Cannot find module '@openmobilehub/auth-google' from 'setup-jest.ts'

Workaround: I was able to push the commit by using the --no-verify flag, but this is not a preferred solution.

Attachments: Error Screenshot

dzuluaga commented 3 weeks ago

LGTM. Thx!