YuQin Tan
YuQin Tan

Reputation: 51

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.

enter image description here react-native version: v0.66.0, platform: Mac OS Big Sur 11.6.2, How can I fix this?

Upvotes: 5

Views: 8921

Answers (3)

Abhi
Abhi

Reputation: 480

Nothing worked for me, but these steps.

  • npm i native-base --legacy-peer-deps
  • npm install normalize-css-color

Upvotes: 0

Kevin
Kevin

Reputation: 101

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'.

Upvotes: 10

Mohammad Rehan
Mohammad Rehan

Reputation: 131

install '@react-native/normalize-color' using command line npm i @react-native/normalize-color

Upvotes: 13

Related Questions