0

I just started learning React Native. I completed my first beginner app. When i tried to install react-devtools but i got a problem. I dont know how to fix it.

PS C:\Users\neveractually\my-app> npm install -g react-devtools
npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead.
npm ERR! code 1
npm ERR! path C:\Users\neveractually\AppData\Roaming\npm\node_modules\react-devtools\node_modules\electron
npm ERR! command failed
npm ERR! command C:\Windows\system32\cmd.exe /d /s /c C:\Users\NEVERA~1\AppData\Local\Temp\postinstall-6496f28c.cmd
npm ERR! RequestError: connect ETIMEDOUT 185.199.108.133:443
npm ERR!     at ClientRequest.<anonymous> (C:\Users\neveractually\AppData\Roaming\npm\node_modules\react-devtools\node_modules\got\source\request-as-event-emitter.js:178:14)
npm ERR!     at Object.onceWrapper (node:events:642:26)
npm ERR!     at ClientRequest.emit (node:events:539:35)
npm ERR!     at ClientRequest.origin.emit (C:\Users\neveractually\AppData\Roaming\npm\node_modules\react-devtools\node_modules\@szmarczak\http-timer\source\index.js:37:11)
npm ERR!     at TLSSocket.socketErrorListener (node:_http_client:454:9)
npm ERR!     at TLSSocket.emit (node:events:527:28)
npm ERR!     at emitErrorNT (node:internal/streams/destroy:157:8)
npm ERR!     at emitErrorCloseNT (node:internal/streams/destroy:122:3)
npm ERR!     at processTicksAndRejections (node:internal/process/task_queues:83:21)

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\neveractually\AppData\Local\npm-cache\_logs\2022-08-12T13_53_42_676Z-debug-0.log

1 Answers1

0

Finally, i fix it. Although I did not understand the problem specifically, I was able to solve it. And this solve works for me:

    npm uninstall -g react-devtools
    npm uninstall -g electron
    npm install -g --verbose react-devtools