The development server returned response error code 500

When I am starting my react-native expo app, I get the following error on my phone:

The development server returned response error code: 500

Whereas in the metro bundler console I see the following message:

Unable to resolve “./build/App” from “App.js”

I should note that my code is in /src and is written in typescript, and I am running rimraf /build && npm run tsc -- before running expo-cli start . This converts my typescript files to javascript in /build .

This constellation has been working for me for the past year with no problem, the only recent change I made was upgrading to expo 32, but this was more that a month ago.

I tried running npm cache clean --force , I cleared the node_modules folder and ran npm install with no luck.

The package.json file can be found here

Any ideas?

Hey, we have a similar setup and one of our team members keeps having this same problem. Sometimes rm -rf node_modules && yarn install && yarn start works, sometimes it either doesn’t or has to be repeated several times. Cache cleaning or watchman watch-del-all doesn’t seem to help either.

Quite strange as only one team member gets this error repeatedly, the others only see it every once in a while.

This is a very frustrating problem, I wish I had ideas for solving it

1 Like

Hi again, since writing my last reply just stopping the process and then using watchman watch-del-all without doing anything else (removing node_modules e.g.) and then running npm start or yarn start again has worked perfectly. Hope that works for you too :muscle:

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