Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: Cannot read property 'bold' of undefined => bgBlack? #208

Closed
ORESoftware opened this issue Sep 10, 2017 · 9 comments
Closed

TypeError: Cannot read property 'bold' of undefined => bgBlack? #208

ORESoftware opened this issue Sep 10, 2017 · 9 comments

Comments

@ORESoftware
Copy link

I swear bgBlack is available

but when I do this:

chalk.bgBlack.white.bold()

I get:

TypeError: Cannot read property 'bold' of undefined

@Qix-
Copy link
Member

Qix- commented Sep 11, 2017

Hey there, I can't reproduce this.

> chalk.bgBlack.white.bold('hello')
'\u001b[40m\u001b[37m\u001b[1mhello\u001b[22m\u001b[39m\u001b[49m'

Which version of Chalk are you using?

@sindresorhus
Copy link
Member

sindresorhus commented Sep 11, 2017

Which npm version are you using? Make sure you're using the latest one, and then reinstall.

@ORESoftware
Copy link
Author

ORESoftware commented Sep 11, 2017

weird, thx, let me re-investigate, I should be on "chalk": "^1.1.3"...

since NPM v5 has been causing so much trouble, I have been sticking with v4.6.1.

@LitoMore
Copy link
Contributor

@ORESoftware Cannot read property 'bold' of undefined means that chalk.bgBlack.white is undefined, NOT chalk.bgBlack is undefined.

You need to swear chalk.bgBlack.white is available. :)

@ORESoftware
Copy link
Author

@LitoMore thaz true

@sindresorhus
Copy link
Member

Closing as it's most likely an npm issue.

@jaspermayone
Copy link

Also having this issue

@duckytutorials
Copy link

Same issue but on v4 becouse v5 is not common js

@Qix-
Copy link
Member

Qix- commented Oct 10, 2022

Please open a new issue then with all relevant information. This is a 5 year old issue about a very old version of Chalk.

@chalk chalk locked as resolved and limited conversation to collaborators Oct 10, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants