electron: Terminal colors are not supported through electron in Windows
- Electron version: 1.7.10
- Operating system: Windows
Expected behavior
When running in regular node (not electron) colors are supported and output correctly
node index.js

When running in electron colors are not supported and do not output correctly
.\node_modules\.bin\electron .

How to reproduce
My code…
//index.js
console.log(process.versions)
console.log(require('chalk').red('hi there'))
console.log(require('supports-color'))
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Reactions: 3
- Comments: 15 (4 by maintainers)
Hi I’m having the same issue with electron 8.0.1 And windows 10.
To recreate - create a new project with electron / chalk - using these:
package.json
index.js
Then run either with npm or directly calling electron.exe you’ll see the issue on both cases. However, when running with npm the console does indeed support color if specified directly.
Using npm
Using electron.exe
This is the expected result, using npm with macOS Catalina
It’s not blocked/need-info. That was removed on the 26th Feb.
This still happens on Electron v5.0.2 Windows 10. Makes the debug package not work as expected.
Issue still exists in Electron v10.1.1 Windows 10 pro OS build 19041.508
Electron v4.1.3 + Windows 7/10, still has this issue.
done
Why is this “blocked/need-info”? The example is concise and reproduceable is it not?I’m seeing the same issue, as I offer a command line version of my ElectronJS GUI for automation. I’m using electron v8.2.1.