EAS BUILD ERROR: Could not add expo-dev-client dependencies to existing file /root/workingdir/build/react-native.config.js

I am trying to build a dev client with my project and am getting the following error…I haven’t even added any custom native code yet… i was just trying to build it first:

Here is the command I used:

eas build --profile development --platform android

Here is the error:

[04:27:32] [android.dangerous]: withAndroidDangerousBaseMod: Could not add expo-dev-client dependencies to existing file /root/workingdir/build/react-native.config.js. See expo-dev-client installation instructions to add them manually: Installation in React Native and Bare workflow projects - Expo Documentation

Expo Doctor says: � Didn’t find any issues with the project!

Here is my environment info:

platform win32
arch x64
cpu 8 cores Intel(R) Core™ i7 CPU 950 @ 3.07GHz

JavaScript (and globally-installed packages)
node 16.13.0 C:\Program Files\nodejs\node.EXE
npm 8.1.0 C:\Program Files\nodejs\npm.CMD
eas-cli 0.38.2
expo-cli 4.13.0
prettier 2.4.1
yarn 1.22.17
yarn 1.22.17 C:\Users\razor\AppData\Roaming\npm\yarn.CMD
eas-cli 0.38.2
expo-cli 4.13.0

Hey @razor2021, if your project is a bare or vanilla react-native one then you need to follow the instructions linked in the error logs. If it’s a managed project, we might have an issue at hand.

Cheers,
Adam

I had the exact same issue on the ‘prebuild’ stage and the problem was that I had added expo-dev-client in my package.json by accident.
All was good, once i removed it.