Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Expo fails to build, Request failed with status code 400

I'm trying to build a project in expo react native project.

My expo version is 3.2.2, sdkVersion is 35.

When I ran in cmd (on Windows 10)

set EXPO_DEBUG=true
expo build:android -c

I got:

Request failed with status code 400

Error: Request failed with status code 400
  at createError (C:\Users\Jonny\AppData\Roaming\npm\node_modules\expo-cli\node_modules\axios\lib\core\createError.js:16:15)
  at settle (C:\Users\Jonny\AppData\Roaming\npm\node_modules\expo-cli\node_modules\axios\lib\core\settle.js:17:12)
  at IncomingMessage.handleStreamEnd (C:\Users\Jonny\AppData\Roaming\npm\node_modules\expo-cli\node_modules\axios\lib\adapters\http.js:237:11)
  at IncomingMessage.emit (events.js:203:15)
  at endReadableNT (_stream_readable.js:1145:12)
  at process._tickCallback (internal/process/next_tick.js:63:19)

I'm tried to update expo version, sdkVersion, the version in react, check for internet connection.

Expo login and logout works fine. I don't have any proxy in my network.

I don't have any clues for what search or how to fix this problem.

like image 360
Jonny Piazzi Avatar asked Oct 04 '19 08:10

Jonny Piazzi


3 Answers

Seems was a error in expo-cli version 3.2.2.

The update 3.2.3 fixed for me.

like image 67
Jonny Piazzi Avatar answered Oct 27 '22 17:10

Jonny Piazzi


I have fixed the issue by using this command

Move to your root folder then type this command in your terminal

npm install -g expo-cli

like image 3
IKKA Avatar answered Oct 27 '22 17:10

IKKA


I had two versions of expo-cli installed (one via yarn global install expo-cli and one as a dev dependency in project yarn add -D expo-cli). This started working for me after I removed the global expo-cli: yarn global remove expo-cli and used the local version in my project instead: yarn run expo-cli start

like image 1
GentryRiggen Avatar answered Oct 27 '22 17:10

GentryRiggen