Closed jstarmx closed 10 months ago
I had amazon-cognito-identity-js
package as a dependency in package.json.
Solution was to remove this dependency, clean everything as usual (modules, lock file, build folder in xcode) and install again
npm install aws-amplify@6 @aws-amplify/react-native @react-native-community/netinfo @react-native-async-storage/async-storage react-native-get-random-values
After this no duplicated symbols appeared.
Upd: This is actually mentioned in docs 'To upgrade React Native projects that do not utilize aws-amplify-react-native, remove amazon-cognito-identity-js from the project package.json and install @aws-amplify/react-native.'
I had
amazon-cognito-identity-js
package as a dependency in package.json.Solution was to remove this dependency, clean everything as usual (modules, lock file, build folder in xcode) and install again
npm install aws-amplify@6 @aws-amplify/react-native @react-native-community/netinfo @react-native-async-storage/async-storage react-native-get-random-values
After this no duplicated symbols appeared.
Upd: This is actually mentioned in docs 'To upgrade React Native projects that do not utilize aws-amplify-react-native, remove amazon-cognito-identity-js from the project package.json and install @aws-amplify/react-native.'
This worked for me 🙌
Me too. Thank you so much @jj2020driver
for me too, it went under the hood migrating from 5 to 6 ...thanks!!!!
Hi @jstarmx thank you for opening this issue. Have you had a chance to try @jj2020driver solution and see if this is resolved for you?
@jj2020driver thank you for sharing the fix!
@nadetastic yes that works, thanks and also to @jj2020driver
The docs need updating as they instruct you to install amazon-cognito-identity-js
alongside @aws-amplify/react-native
. https://ui.docs.amplify.aws/react-native/connected-components/authenticator#step-2-install-dependencies
Is there somewhere I can raise a PR?
@jstarmx thanks for the feedback! The documentation has been updated. I'll go ahead and close out this issue for now, but let me know if you have any addtional questions.
Does this mean it's impossible to use AWSAmplify UI and the cognito JS in the same react native project? I'm tryinf to use both because AmplifyUI doesn't seem to have the ability to get signin details from the currently signed in user reliably and the docs more or less suggest using the cognito js library for that. Thanks for any help!
I had
amazon-cognito-identity-js
package as a dependency in package.json.Solution was to remove this dependency, clean everything as usual (modules, lock file, build folder in xcode) and install again
npm install aws-amplify@6 @aws-amplify/react-native @react-native-community/netinfo @react-native-async-storage/async-storage react-native-get-random-values
After this no duplicated symbols appeared.
Upd: This is actually mentioned in docs 'To upgrade React Native projects that do not utilize aws-amplify-react-native, remove amazon-cognito-identity-js from the project package.json and install @aws-amplify/react-native.'
Worked !!! THX 🎉
Before opening, please confirm:
JavaScript Framework
React Native
Amplify APIs
Not applicable
Amplify Version
v6
Amplify Categories
Not applicable
Backend
None
Environment information
Describe the bug
After installing the @aws-amplify/react-native package, running an iOS build in XCode fails with a duplicate symbols error, specifically
JKBigInteger
andJKBigDecimal
.I've tried cleaning everything I can - Pods, Podfile.lock, node_modules, caches, derived data, build folder. From a completely clean slate (as far as I can tell) the error still reproduces.
Expected behavior
Build should succeed without error.
Reproduction steps
npm install
with the below package.jsonPod install
Code Snippet
Log output
aws-exports.js
No response
Manual configuration
No response
Additional configuration
No response
Mobile Device
No response
Mobile Operating System
No response
Mobile Browser
No response
Mobile Browser Version
No response
Additional information and screenshots
No response