Using amplify with expo managed react-native environment causes module naming collision error with jest-haste-map.

I am using Amplify with an expo react-native managed workspace.

I’ve added a function with “amplify add function” and pushed it. Now I have two locations of the function. One is in “./amplify/backend/function/myfunction/src”
And the other is at “./amplify/#current-cloud-backend/function/myfunction/src”

The error I get is: UnhandledPromiseRejectionWarning: Error: jest-haste-map: Haste module naming collision: Duplicate module name: myfunction

Paths: /home/ec2-user/environment/myapp/amplify/backend/function/myfunction/src/package.json collides with /home/ec2-user/environment/myapp/amplify/#current-cloud-backend/function/myfunction/src/package.json

Any ideas how to resolve this error?

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.

related issue:
leads to this solution: