Eas Build on android suddenly started crashing , steps to fix it?

expo version : 47.0.3
eas version : 2.2.1 (in eas.json)
Hi, I was just going to submit my app to the play store today when suddenly it doesn’t build anymore.
It was building before like a day or two . I don’t know what changed , please help me with steps I need to check to see whats happening . i tried running expo-cli doctor it says everything fine .

This is the build error:

Running "npm install" in the root dir of your repository 

2[stderr]

npm ERR!

3[stderr]

code ERESOLVE

4[stderr]

npm ERR!

5[stderr]

ERESOLVE could not resolve

6[stderr]

npm ERR!

7[stderr]

npm

8[stderr]

ERR! While resolving: react-native-circular-progress-indicator@4.4.0

9[stderr]

npm ERR! Found: react-native-svg@13.4.0

10[stderr]

npm ERR! node_modules/react-native-svg

11[stderr]

npm

12[stderr]

ERR!   react-native-svg@"13.4.0" from the root project

13[stderr]

npm ERR!   peer react-native-svg@">=12.0.0" from react-native-svg-transformer@1.0.0

14[stderr]

npm ERR!   node_modules/react-native-svg-transformer

15[stderr]

npm ERR!     react-native-svg-transformer@"^1.0.0" from the root project

16[stderr]

npm ERR! 

17[stderr]

npm ERR! Could not resolve dependency:

18[stderr]

npm ERR! peer react-native-svg@"^12.1.1" from react-native-circular-progress-indicator@4.4.0

19[stderr]

npm

20[stderr]

ERR! node_modules/react-native-circular-progress-indicator

21[stderr]

npm ERR!   react-native-circular-progress-indicator@"^4.4.0" from the root project

22[stderr]

npm ERR! 

23[stderr]

npm ERR! Conflicting peer dependency: react-native-svg@12.4.4

24[stderr]

npm ERR! node_modules/react-native-svg

25[stderr]

npm ERR!   peer react-native-svg@"^12.1.1" from react-native-circular-progress-indicator@4.4.0

26[stderr]

npm ERR!   node_modules/react-native-circular-progress-indicator

27[stderr]

npm ERR!     react-native-circular-progress-indicator@"^4.4.0" from the root project

28[stderr]

npm ERR! 

29[stderr]

npm ERR! Fix the upstream dependency conflict, or retry

30[stderr]

npm ERR! this command with --force, or --legacy-peer-deps

31[stderr]

npm ERR! to accept an incorrect (and potentially broken) dependency resolution.

32[stderr]

npm ERR! 

33[stderr]

npm ERR! See /home/expo/.npm/eresolve-report.txt for a full report.

34[stderr]


35[stderr]

npm ERR! A complete log of this run can be found in:

36[stderr]

npm ERR!     /home/expo/.npm/_logs/2022-11-29T12_10_49_251Z-debug-0.log

37npm exited with non-zero code: 1

We recently updated the default node version from 16.13.2 to 16.18.1 , so the default npm was also updated. Newer npm is more strict on ensuring the correct peer dependencies are installed. You can either:

2 Likes

Hi, thanks so much for your answer, because right now i don’t have enough time to change or fix all of the dependencies , i would like to try second or third option , could you elaborate a little more please?

Hi @lukaork

For the second option, try creating a file called .npmrc in the root of your project containing exactly legacy-peer-deps=true and add it to Git.

For the third option, specify the node version in your build profiles in eas.json. See here for an example: Selecting build tool versions

1 Like

@wodin Thanks for your time as well , yes I figured out where to specify node build version and my build bypassed the install dependencies step , thanks guys .

No problem. Going forward I suppose you’ll want to switch to one of the other options, since you won’t be able to stick with that version of node forever :slight_smile:

1 Like

Haha, I guess so, as a starter in react-native/expo, my priorities are to gain all the experience from this kind of things , so it should be fine, thanks again and this was my first time posting here and already have faith that this community will help me grow .

1 Like

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