nick@nick:/usr/lib$ sudo npm install -g react-devtools
/usr/bin/react-devtools -> /usr/lib/node_modules/react-devtools/bin.js
[email protected] postinstall /usr/lib/node_modules/react-devtools/node_modules/electron
node install.js
module.js:549
throw err;
^
Error: Cannot find module '/usr/lib/node_modules/react-devtools/node_modules/electron/install.js'
at Function.Module._resolveFilename (module.js:547:15)
at Function.Module._load (module.js:474:25)
at Function.Module.runMain (module.js:693:10)
at startup (bootstrap_node.js:191:16)
at bootstrap_node.js:612:3
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] postinstall: node install.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/nick/.npm/_logs/2018-06-25T20_57_54_319Z-debug.log
Having the same problem. This seems to work though:
sudo npm install -g react-devtools --unsafe-perm=true
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
Most helpful comment
Having the same problem. This seems to work though:
sudo npm install -g react-devtools --unsafe-perm=true