uuid: React Native require error
require('node-uuid') or import uuid form 'node-uuid' results in a Unable to resolve module crypto error.
If I switch out require('crypto') with require('crypto-js'), and specifically include the crypto-js library instead, it works fine. Are we able to look at swapping out crypto with crypto-js?
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Reactions: 6
- Comments: 19 (1 by maintainers)
Commits related to this issue
- Remove usage of node-uuid due to incompatibility with iOS (https://github.com/broofa/node-uuid/issues/133) Added dev urls for android and iOS — committed to jayfunk/pocketguide by jayfunk 8 years ago
- Revert node-uuid because it's not universal https://github.com/broofa/node-uuid/issues/133 This reverts commit 0c05c4c241d0e9e131bbe56c27cfe251c83349b8, reversing changes made to 97062d828b3f5c8c038... — committed to este/este by steida 8 years ago
I hope Robert will get time to merge it, meanwhile I created little something as a temporary replacement: https://www.npmjs.com/package/react-native-uuid
@broofa you should add some contributor if you don’t have much time to merge some PRs or fix some issues
It can be temporarily resolved by using babel-plugin-module-resolver. Install
babel-plugin-module-resolverAnd
crypto-jsEdit
.babelrc