Lerna --stream removing chalk colors log
See original GitHub issueExpected Behavior
Chalk colors should be shown in the terminal. That’s the whole point of using chalk in the first place.
Current Behavior
lerna run --stream
command gives below kind of output. All the colors go away!! 😦
Possible Solution
Please allow colors in lerna run --stream
Steps to Reproduce (for bugs)
- Run node filename_having_chalk_logs.js It’ll print proper chalk logs
- Now run the same command through lerna run <npm command> --stream, it won’t show the colors
lerna.json
<!-- Please paste your `lerna.json` here -->
{
"packages": [
"packages/**"
],
"npmClient": "yarn",
"useWorkspaces": true,
"version": "independent"
}
lerna-debug.log
<!-- If you have a `lerna-debug.log` available, please paste it here -->
<!-- Otherwise, feel free to delete this <details> block -->
Context
I’m running a Koa server to proxy api requests coming from my react app to relay them to the backend servers, I’ve applied morgan logs for intercepting requests and spent lot of time in making the output colorful, but sadly all in vain cause of lerna. Please help.
Your Environment
Executable | Version |
---|---|
lerna --version |
3.15.0 |
npm --version |
6.10.2 |
yarn --version |
1.17.3 |
node --version |
12.6.0 |
OS | Version |
---|---|
macOS Mojave | 10.14.6 |
Issue Analytics
- State:
- Created 4 years ago
- Reactions:23
- Comments:9
Top Results From Across the Web
Lerna --stream removing chalk colors log - - Bountysource
Expected Behavior. Chalk colors should be shown in the terminal. That's the whole point of using chalk in the first place.
Read more >Chalk, TypeScript and Lerna - DEV Community
Next problem: color output is stripped when using Lerna. If you run lerna run doit --scope mypackage --stream all color output is stripped....
Read more >Chalk, TypeScript and Lerna - Serge van den Oever's weblog
Next problem: color output is stripped when using Lerna. If you run lerna run doit --scope mypackage --stream all color output is stripped....
Read more >@lerna/clean | Yarn - Package Manager
Change Log. All notable changes to this project will be documented in this file. See Conventional Commits for commit guidelines.
Read more >Chalk NPM | npm.io
Compose multiple styles using the chainable API log(chalk.blue. ... instance configured with color support detected for stderr stream instead of stdout .
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 FreeTop 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
Top GitHub Comments
FORCE_COLOR=1
should also fix the problem for chalk 😃I made a package that supports colors: https://github.com/Akryum/monorepo-run 🐈