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?

1 Like

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

related issue: https://github.com/aws-amplify/amplify-cli/issues/1144
leads to this solution: https://github.com/aws/awsmobile-cli/issues/172#issuecomment-410931468