skip to Main Content

I am currently in my development of react native expo project.
Not more than a week ago, running ‘npm start’ in terminal is ok. It starts the expo project.
Now, doing the same gives the error

FetchError: request to
https://api.expo.dev/v2/sdks/49.0.0/native-modules failed, reason:
read ECONNRESET at ClientRequest.
(C:Usersdefault-MAINDocumentstest_projectnode_modulesnode-fetchlibindex.js:1501:11)
at ClientRequest.emit (node:events:513:28) at
TLSSocket.socketErrorListener (node:_http_client:502:9) at
TLSSocket.emit (node:events:513:28)your text at emitErrorNT
(node:internal/streams/destroy:151:8) at emitErrorCloseNT
(node:internal/streams/destroy:116:3) at
process.processTicksAndRejections
(node:internal/process/task_queues:82:21

Tried:
-connect to other network
-restarting computer

No progress. Please help me I have been stuck at this problem for long time now.

2

Answers


  1. Not exactly sure what is causing you this error, can try these, but any luck if works

    1. Assuming you have right internet connection
    2. delete node_modules folder, package-lock.json, yarn.lock from your root directory
    3. npm cache clean -f //clear your npm cache
    4. npm install -g expo-cli //update expo if its not latest
    5. npm install -g yarn or npm install -g npm //install/update npm/yarn latest if not
    6. node -v //check your node version, should be 16 to 18
    7. npm i or yarn // install dependency

    One you do that restart the metro server, do let me know in comments section if that works fro you..

    Login or Signup to reply.
  2. Try this command:

    npx expo start -c
    

    The c stands for clear.

    Or this:

    npm start --reset-cache
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search