'Metro has encountered an error: While trying to resolve module '@react-native/normalize-color'
I just wanted to try react-native.However, after run the script "npm run ios",I got this error in the Xcode's simulator.
react-native version: v0.66.0, platform: Mac OS Big Sur 11.6.2, How can I fix this?
Solution 1:[1]
install '@react-native/normalize-color' using command line npm i @react-native/normalize-color
Solution 2:[2]
Try installing '@react-native/[email protected]' if you are using 'react-native-maps'. This worked for me. It's probably because we may be using an older version of 'react-native' which included an older version of 'normalize-color'.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Mohammad Rehan |
Solution 2 | Kevin |