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.

chalk.bgHex is not a function

See original GitHub issue

I must be missing something really dumb but:

const chalk = require('chalk'),
  _ = require('lodash'),
  info = chalk.yellow,
  green = chalk.green,
  script = chalk.bgHex('#ebd2f8')

Error: chalk.bgHex is not a function

??? why?

“chalk”: “^1.1.3”, is set in my package.json and the others work (green, info, work fine).

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
Qix-commented, Jun 20, 2017

@dschinkel It’s not released on NPM. It’s been merged onto master on Github, however. If you check NPM, it is absent on their (as of this writing) since it hasn’t been released onto NPM yet.

Give us a few hours, we’re making tweaks to many parts of Chalk right now.

0reactions
dschinkelcommented, Jun 20, 2017

got it…thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

chalk.bgHex is not a function - javascript - Stack Overflow
The commit that introduced hex/bgHex was committed just 2 hours ago. There hasn't been a new publish to the NPM repository with that...
Read more >
Chalk - npm
Start using chalk in your project by running `npm i chalk`. ... For situations where using --color is not possible, use the environment ......
Read more >
How to use the chalk.hex function in chalk - Snyk
To help you get started, we've selected a few chalk.hex examples, ... function getRowValue(name, run) { if (!run[name]) { return Chalk.red('NOT SUPPORTED'); } ......
Read more >
styling text in JavaScript using the chalk module - ZetCode
The chalk is a Node. js module which is used for styling the format of text and allows us to create our own...
Read more >
chalk - NPM Package Compare versions - Socket.dev
Note that function styles (`rgb()`, `hsl()`, `keyword()`, etc.) may not contain spaces between parameters. All interpolated ...
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