question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

chaining is not working as expected

See original GitHub issue

Hello Team,

This is my first time using the package, so it likely could be user error. However, I am attempting to chain both green and bold but I am only having the bold show up.

Node: 8.11.3 NPM: 6.9.0 Chalk: 2.4.2

const chalk = require('chalk');

const msg = chalk.bold.green('success!');

console.log(msg);

image

I have tried switching the two around to no avail. Any ideas?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
CGottschallJcommented, May 24, 2019

Hey, It seems that it was the theme I was using. I removed iTerm from my system, reinstalled, and chose a different theme. Seems to be working now!

Thank you for your help!

0reactions
Qix-commented, May 22, 2019

This doesn’t make much sense, iTeem2 is usually the last on the list in terms of emulator bugs. Try creating an entirely new terminal profile that uses all defaults.

Also, see if the following outputs green text:

printf '\x1b[32;1mhello\x1b[m`
Read more comments on GitHub >

github_iconTop Results From Across the Web

KB-1637 Activity chaining not working as expected
KB-1637 Activity chaining not working as expected. Symptoms. A user does not see the subsequent task even when the tasks are activity chained....
Read more >
Why the promises chains does not work as expected (chaining ...
The reason why your code didn't work as expected was that the third then was invoked immediately after the second timeout started, with...
Read more >
Solved: Chaining operation doesn't work - Expected an oper...
Solved: Hello everyone, Can someone explain to me why the chaining operation below is invalid? - i've tried with both operators: (; and...
Read more >
Optional chaining on undefined or null only types · Issue #48280
This issue has been marked 'Working as Intended' and has seen no recent activity. It has been automatically closed for house-keeping purposes.
Read more >
Optional chaining (?.) - JavaScript - MDN Web Docs - Mozilla
This is an idiomatic pattern in JavaScript, but it gets verbose when the chain is long, and it's not safe. For example, if...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found