React-devtools: react devtools standalone app doesn't start Ubuntu 18

Created on 16 Aug 2018  路  12Comments  路  Source: facebook/react-devtools

I want to use the react-devtools as a stand alone app. I am running Ubuntu 18.04.1 LTS and react-devtools 3.2.3. On running 'react-devtools' nothing happens - the app fails to run without any errors.

I installed with 'npm install -g react-devtools' then ran 'react-devtools' and nothing happens.
I put it inside an npm script and ran 'npm run react-devtools' and it generated the following log file:

Here is the error log:
0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/node', '/usr/bin/npm', 'run', 'devtools' ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'predevtools', 'devtools', 'postdevtools' ]
5 info lifecycle [email protected]: [email protected]
6 silly lifecycle [email protected]: no script for predevtools, continuing
7 info lifecycle [email protected]: [email protected]
8 verbose lifecycle [email protected]: unsafe-perm in lifecycle true
9 verbose lifecycle [email protected]: PATH: /usr/share/npm/bin/node-gyp-bin:/home/alex/projects/q-app/node_modules/.bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/usr/lib/jvm/java-8-oracle/bin:/usr/lib/jvm/java-8-oracle/db/bin:/usr/lib/jvm/java-8-oracle/jre/bin:/home/alex/Android/Sdk/tools:/home/alex/Android/Sdk/tools/bin:/home/alex/Android/Sdk/platform-tools:/usr/lib/jvm/java-8-oracle/bin:/usr/lib/jvm/java-8-oracle/db/bin:/usr/lib/jvm/java-8-oracle/jre/bin:/home/alex/Android/Sdk/tools:/home/alex/Android/Sdk/tools/bin:/home/alex/Android/Sdk/platform-tools
10 verbose lifecycle [email protected]: CWD: /home/alex/projects/q-app
11 silly lifecycle [email protected]: Args: [ '-c', 'react-devtools' ]
12 info lifecycle [email protected]: Failed to exec devtools script
13 verbose stack Error: [email protected] devtools: react-devtools
13 verbose stack spawn ENOENT
13 verbose stack at ChildProcess. (/usr/share/npm/lib/utils/spawn.js:17:16)
13 verbose stack at emitTwo (events.js:126:13)
13 verbose stack at ChildProcess.emit (events.js:214:7)
13 verbose stack at maybeClose (internal/child_process.js:925:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
14 verbose pkgid [email protected]
15 verbose cwd /home/alex/projects/q-app
16 error Linux 4.15.0-30-generic
17 error argv "/usr/bin/node" "/usr/bin/npm" "run" "devtools"
18 error node v8.10.0
19 error npm v3.5.2
20 error file sh
21 error code ELIFECYCLE
22 error errno ENOENT
23 error syscall spawn
24 error [email protected] devtools: react-devtools
24 error spawn ENOENT
25 error Failed at the [email protected] devtools script 'react-devtools'.
25 error Make sure you have the latest version of node.js and npm installed.
25 error If you do, this is most likely a problem with the qapp package,
25 error not with npm itself.
25 error Tell the author that this fails on your system:
25 error react-devtools
25 error You can get information on how to open an issue for this project with:
25 error npm bugs qapp
25 error Or if that isn't available, you can get their info via:
25 error npm owner ls qapp
25 error There is likely additional logging output above.
26 verbose exit [ 1, true ]

Most helpful comment

I ran into this same issue, but had success after running:

sudo apt install libgconf-2-4

All 12 comments

@AlexLexo I had the same exact trace .. on gentoo

After looking through the react-devtool bin script, I see it uses electron. Ensure you can start electron from the terminal. In my case I had to npm install -g it, as well as some libraries that it could not find (namely: gconf, and ... cups :disappointed: ..). YMMV there, just do what you have to do so that electron starts. After getting electron to work, the devtools start cleanly.

@jwnewman12 I donno if it is the same issue, I can run electron with no issues. however running react devtools results in the following stack trace.
`
npm info it worked if it ends with ok
npm verb cli [ '/usr/bin/node',
npm verb cli '/usr/bin/npm',
npm verb cli 'run',
npm verb cli '--verbose',
npm verb cli 'react-devtools' ]
npm info using [email protected]
npm info using [email protected]
npm verb run-script [ 'prereact-devtools', 'react-devtools', 'postreact-devtools' ]
npm info lifecycle [email protected]~prereact-devtools: [email protected]
npm info lifecycle [email protected]~react-devtools: [email protected]

npm verb lifecycle [email protected]~react-devtools: unsafe-perm in lifecycle true
npm verb lifecycle [email protected]~react-devtools: PATH: /usr/share/npm/bin/node-gyp-bin:/mnt/sda2/Work/_playground/RN/tictac/node_modules/.bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/koko/Android/Sdk/emulator:/home/koko/Android/Sdk/tools:/home/koko/Android/Sdk/tools/bin:/home/koko/Android/Sdk/platform-tools
npm verb lifecycle [email protected]~react-devtools: CWD: /mnt/sda2/Work/_playground/RN/tictac
npm info lifecycle [email protected]~react-devtools: Failed to exec react-devtools script
npm verb stack Error: [email protected] react-devtools: react-devtools
npm verb stack spawn ENOENT
npm verb stack at ChildProcess. (/usr/share/npm/lib/utils/spawn.js:17:16)
npm verb stack at emitTwo (events.js:126:13)
npm verb stack at ChildProcess.emit (events.js:214:7)
npm verb stack at maybeClose (internal/child_process.js:925:16)
npm verb stack at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
npm verb pkgid [email protected]
npm verb cwd /mnt/sda2/Work/_playground/RN/tictac
npm ERR! Linux 4.15.0-38-generic
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "run" "--verbose" "react-devtools"
npm ERR! node v8.10.0
npm ERR! npm v3.5.2
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! [email protected] react-devtools: react-devtools
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the [email protected] react-devtools script 'react-devtools'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the tictac package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! react-devtools
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs tictac
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls tictac
npm ERR! There is likely additional logging output above.
npm verb exit [ 1, true ]
`

Hello buddy, I have same issue with react-devtools in Unbuntu (18.04 and 18.10 - When run "react-devtools" in terminal and nothing happens)
I fixed it by step method.
First you make sure, Electron working with your version of computer by:

$ git clone https://github.com/electron/electron-quick-start
$ npm install
$ npm start

If it's working prefect then you install "react-devtools" by follow link: https://www.npmjs.com/package/react-devtools
I'm using global installations so i find global path of node_module in my computer. After that i go to folder "react-devtools/node_modules" and remove folder "electron" on it. Then i back to folder of "electron-quick-start/node_modules" (That we clone from git before) and copy folder "electron" to "react-devtools/node_modules" and run "react-devtools" in terminal and it's work.

Sorry my bad english.
I hope it can help you.

I installed react-devtoolsas a project dependency and faced the same issue. The solution I found was to manually install electron from the module:

$ node node_modules/electron/install.js

I hope this helps someone.

I installed react-devtoolsas a project dependency and faced the same issue. The solution I found was to manually install electron from the module:

$ node node_modules/electron/install.js

I hope this helps someone.

I tried it a several time, but it's still doesn't work. Only After i edit version of electron in package.json to newest then then it's working

I ran into this same issue, but had success after running:

sudo apt install libgconf-2-4

I ran into this same issue, but had success after running:

sudo apt install libgconf-2-4

Thanks mate. This solution worked for me. God bless you!

For Arch/Manjaro users:

sudo pacman -S gconf

I gonna leave my error messages here so others could google them:

$ yarn react-devtools
yarn run v1.13.0
$ [project]/node_modules/.bin/react-devtools
error Command failed with exit code 127.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
$ electron
[project]/node_modules/electron/dist/electron: error while loading shared libraries: libgconf-2.so.4: cannot open shared object file: No such file or directory

I ran into this same issue, but had success after running:

sudo apt install libgconf-2-4

Thank you very much. I searched everywhere for a solution and this has solved it for me.

I had the same issue. Solved by:

android update sdk --all
sudo apt-get install libswt-gtk-3-java libswt-gtk-3-jni

Not sure if the first step was necessary.

I ran into this same issue, but had success after running:

sudo apt install libgconf-2-4

You sir, are a god! Thanks a lot :)

React DevTools has been rewritten and recently launched a new version 4 UI. The source code for this rewrite was done in a separate repository and now lives in the main React repo (github.com/facebook/react).

Because version 4 was a total rewrite, and all issues in this repository are related to the old version 3 of the extension, I am closing all issues in this repository. If you can still reproduce this issue, or believe this feature request is still relevant, please open a new issue in the React repo: https://github.com/facebook/react/issues/new?labels=Component:%20Developer%20Tools

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mmahalwy picture mmahalwy  路  3Comments

nareshbhatia picture nareshbhatia  路  3Comments

prasannavl picture prasannavl  路  3Comments

aganglada picture aganglada  路  4Comments

txiaocao picture txiaocao  路  5Comments