expo start is running my project

Everthing was working fine untill i press shift-d after that its showing this error cant find any thing related to this devtool issues

Opening DevTools in the browser… (press shift-d to disable)
Error: spawn cmd ENOENT
at Process.ChildProcess._handle.onexit (internal/child_process.js:264:19)
at onErrorNT (internal/child_process.js:456:16)
at processTicksAndRejections (internal/process/task_queues.js:80:21)

i tried updating expo to its latest version but nothing works is there any way to disable dev tools this just stuck badly

my environment:
Expo CLI 3.11.7
npm: 6.10.3

Hi

In your home directory you should have a directory called .expo. Within that is a file called state.json.
Make sure expo is not running. Edit this file and change the value of the openDevToolsAtStartup key.

hi wodin
i found this file but it contain only a single path i.e

“PATH”: “C:\Program Files\nodejs;C:\ProgramData\chocolatey\bin;C:\Program Files\nodejs\;F:\anacondasetup;F:\anacondasetup\Library\mingw-w64\bin;F:\anacondasetup\Library\usr\bin;F:\anacondasetup\Library\bin;F:\anacondasetup\Scripts;C:\Users\DANISH\AppData\Local\Programs\Python\Python37\Scripts\;C:\Users\DANISH.LAPTOP\AppData\Local\Programs\Python\Python37\;C:\Program Files\Java\jdk1.8.0_111\bin;F:\Microsoft VS Code\bin;C:\Users\DANISH\AppData\Roaming\npm”

cant find openDevToolsAtStartup in here

OK, then try renaming your .expo directory in your home directory to e.g. .expo.bak and remove the .expo directory in your app’s root directory and see if that helps.

That is unlikely to fix the underlying ENOENT issue, but should reset the devtools startup setting.

still the same error did the both changes doesnt work

Expo DevTools is running at http://localhost:19002
Opening DevTools in the browser… (press shift-d to disable)
Error: spawn cmd ENOENT
at Process.ChildProcess._handle.onexit (internal/child_process.js:264:19)
at onErrorNT (internal/child_process.js:456:16)
at processTicksAndRejections (internal/process/task_queues.js:80:21)

where to find devtoolsstartup setting???

I think the devtools startup is a red herring. The openDevToolsAtStartup setting should be in the state.json file in the .expo directory in your home directory, but I’m not sure when exactly it’s written. Also, you should not need to edit that file manually.

Has expo start or npm start ever worked without that “Error: spawn cmd ENOENT” error on your machine?

yes offcourse it used to work absolutely perfect untill i press shift-d
actually i used to open dev tool manually by coping the port number from cmd and pasting int onto the browser
to open devtool automatically i pressed shift-d then all this happened and it just stuck here

i tried reinstalling expo after deleting it completely but its showing the same error everytime now

OK. The problem is that debugging this by proxy is really difficult. I have no idea why you would be getting that ENOENT error. It basically means “file not found”, and the “spawn cmd” part of it means it’s trying to run something. But I don’t know what it’s trying to run, exactly and I don’t see why pressing Shift-d would have caused this to happen.

This is just a guess. I don’t know if it will help. But maybe try editing your %HOMEDRIVE%%HOMEPATH%\.expo\state.json file to add in:

  "openDevToolsAtStartup": false,

e.g. just above the “PATH” line.

Thanks alot for your time after adding this its start working now like before tysm

“openDevToolsAtStartup”: false,

Well I’m glad it’s working now, but it’s very strange.

1 Like

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