Android and iOS build fails: error @react-native/normalize-colors@0.73

Hi everyone!

When I tried to do either a production or a development build of my Expo react native project, I’m encountering an issue with the currently released react-native version 0.72.5. The error suggests a version incompatibility between the required node version for @react-native/normalize-colors@0.73.1 and the node version present in the environment.

Error:

[stderr] 
warning react-native-video > shaka-player@2.5.23: Shaka Player < v4.2 is no longer supported.
[2/4] Fetching packages...
[stderr] 
error @react-native/normalize-colors@0.73.1: The engine "node" is incompatible with this module. Expected version ">=18". Got "16.18.1"
[stderr] 
error Found incompatible module.

Versions:
eas-cli/5.3.0
darwin-arm64
node-v20.7.0
npx 10.1.0
expo-doctor 1.1.3

 "react-native": "^0.72.5",
 "expo": "^49.0.12",
 "babel-preset-expo": "^9.5.2",

What have I tried?

  • nvm install node --reinstall-packages-from=node: node version from 18.18.0 to 20.7.0
  • Reinstalled react-native
  • rm -rf node_modules and npm i
  • npx expo-doctor: Didn't find any issues with the project!

Has anyone encountered the same error? How did you solve it?
Thank you!

Hi @irinagm

By default, the build servers have Node 16.x installed:

You can override this in eas.json:

Hi,

I have exactly the same problem in past two days when I was doing a EAS build for my project (Expo SDK 49 with React Native 0.72.5).

The same project was able to build on Sept.25th but failed since yesterday Sept.26th. In local environment, React Native has dependency of “@react-native/normalize-colors”: “^0.72.0” in its package.json file in node_modules folder.

It seems EAS build server resolves react native dependencies with @react-native/normalize-colors@0.73 which causing the issue as EAS build server doesn’t support node v18.

We tried to change eas.json file to make node version as 18.x, but eas-cli gives us error:
eas.json is not valid.

  • “build.base.node” failed custom validation because 18.x is not a valid version

So how to config the node version to make it work?

Thanks.

here is the upstream react-native issue: Unable to create new RN 0.72 project with Node 16 · Issue #39692 · facebook/react-native · GitHub

@billy.liu - you can specify a specific node version, such as 18.18.0

Yes, it works. Thanks for your information.

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.