Cannot read property 'commandLine' of undefined
See original GitHub issuehttps://github.com/Jam3/devtool/blob/dab319eef616f995d3c6d497c4afee2ae891cf54/server.js#L20
❯ node -v
v6.2.0
❯ npm i -g devtool
/usr/local/bin/devtool -> /usr/local/lib/node_modules/devtool/bin/index.js
/usr/local/lib
└── devtool@1.11.2
❯ devtool
App threw an error when running [TypeError: Cannot read property 'commandLine' of undefined]
/usr/local/lib/node_modules/devtool/node_modules/electron-prebuilt/dist/Electron.app/Contents/Resources/default_app.asar/main.js:267
throw e
^
TypeError: Cannot read property 'commandLine' of undefined
at Object.<anonymous> (/usr/local/lib/node_modules/devtool/server.js:20:4)
at Module._compile (module.js:413:34)
at Object.Module._extensions..js (module.js:422:10)
at Module.load (module.js:357:32)
at Function.Module._load (module.js:314:12)
at loadApplicationPackage (/usr/local/lib/node_modules/devtool/node_modules/electron-prebuilt/dist/Electron.app/Contents/Resources/default_app.asar/main.js:253:23)
at Object.<anonymous> (/usr/local/lib/node_modules/devtool/node_modules/electron-prebuilt/dist/Electron.app/Contents/Resources/default_app.asar/main.js:293:5)
at Module._compile (module.js:413:34)
at Object.Module._extensions..js (module.js:422:10)
at Module.load (module.js:357:32)
Issue Analytics
- State:
- Created 7 years ago
- Comments:8 (4 by maintainers)
Top Results From Across the Web
npm err! cannot read properties of undefined (reading 'name')
Solution 1: Clear Cache. First you need to clear your cache by this command: npm cache clear --force. Now, run npm install command....
Read more >Electron - "Cannot read property 'on' of undefined"; tried ...
Using the command line to troubleshoot, I'm seeing that app and ipc variables are undefined but the other required variables (like os, fs,...
Read more >Cannot read property 'length' of undefined on forge/cli v1.3.4
After downloading a working codebase I started seeing the following error: Error: Cannot read property 'length' of undefined TypeError: ...
Read more >[Electron Quick Start Issue] TypeError: Cannot read property ...
... [Electron Quick Start Issue] TypeError: Cannot read property 'on' of undefined ... Try to run npm install --save-dev electron again Make sure...
Read more >How To Fix TypeError: Cannot Read Property - Tom McFarlin
The best solution I've found to the problem is to remove webpack and the webpack-cli and reinstall it using the --save-dev directive.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I think it’s because of the electron module which some devs have accidentally installed globally (thinking it is related to Atom’s Electron). It seems like Electron should guard against this somehow.
I was getting the same error this morning. I think I’ve pinned down the problem, and it isn’t a problem with devtool or electron. It happens when electron is installed globally, so remove it and install devtool again.
Here’s what I did and it’s up and running.