MetaMask / MetaMask/metamask-sdk
Unable to resolve module node:crypto
- Dominant language
- TypeScript
- Stars
- 338
- Forks
- 260
- PR merge metrics
- No merged PRs in 30d
Description
### SDK
React-Native
### Provide environment information
My React Native version is
"react-native": "0.73.6",
### MetaMask SDK Version
"@metamask/sdk-react": "^0.33.0"
### MetaMask Mobile app Version
..
### What browser are you using? (if relevant)
_No response_
### How are you deploying your application? (if relevant)
_No response_
### Describe the Bug
error: Error: Unable to resolve module node:crypto from /Users/meghawalia/Desktop/AwesomeProject/node_modules/@metamask/sdk-react/dist/react-native/es/metamask-sdk-react.js: node:crypto could not be found within the project or in these directories: node_modules
### Expected Behavior
App is crashing
### Link to reproduction - Issues with a link to complete (but minimal) reproduction code will be addressed faster
_No response_
### To Reproduce
executed - "npm run android" cmd.
Contributor guide
Research direction
The failure is reported from node_modules/@metamask/sdk-react/dist/react-native/es/metamask-sdk-react.js; start by inspecting that React Native entry and the project's module resolution with React Native 0.73.6. Run npm run android to reproduce the crash. Done means the app starts without the node:crypto resolution error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- node.js, react-native, typescript
- Domain
- mobile-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100