Jonny Piazzi
Jonny Piazzi

Reputation: 3784

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.

Upvotes: 9

Views: 5763

Answers (4)

sadiq
sadiq

Reputation: 2308

Run those following command, then we are good to go.

$ yarn global remove expo-cli && yarn global add expo-cli

$ rm -rf node_modules/ yarn.lock  && yarn install

$ yarn run start

Upvotes: 0

JAK
JAK

Reputation: 6471

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

Upvotes: 3

GentryRiggen
GentryRiggen

Reputation: 858

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

Upvotes: 1

Jonny Piazzi
Jonny Piazzi

Reputation: 3784

Seems was a error in expo-cli version 3.2.2.

The update 3.2.3 fixed for me.

Upvotes: 4

Related Questions