Error Chalk has no method 'grey' after update
See original GitHub issueAfter chalk was updated last night with version 1.1.3, I started having troubles with fancy-log, as npm is requiring this version:
├─┬ fancy-log@1.2.0
│ ├─┬ chalk@1.1.3
│ │ ├── escape-string-regexp@1.0.5
│ │ └─┬ strip-ansi@3.0.1
│ │ └── ansi-regex@2.0.0
The error output shows the following:
/node_modules/fancy-log/index.js:9
return '['+chalk.grey(timestamp('HH:mm:ss'))+']';
^
TypeError: Object #<Chalk> has no method 'grey'
at getTimestamp (node_modules/fancy-log/index.js:9:20)
at log (node_modules/fancy-log/index.js:13:14)
at module.exports (node_modules/gulp-util/lib/log.js:11:14)
at Object.module.exports.logError (node_modules/gulp-notify/lib/extra_api.js:20:3)
at logError (node_modules/gulp-notify/lib/notify.js:91:11)
at node_modules/gulp-notify/lib/notify.js:63:7
at module.exports (node_modules/gulp-notify/lib/report.js:37:12)
at DestroyableTransform._flush (node_modules/gulp-notify/lib/notify.js:62:5)
at DestroyableTransform.<anonymous> (node_modules/gulp-notify/node_modules/readable-stream/lib/_stream_transform.js:135:12)
at DestroyableTransform.g (events.js:180:16)
Process exited with code 8
The line where the error is reported is really straightforward:
var chalk = require('chalk');
var timestamp = require('time-stamp');
function getTimestamp(){
return '['+chalk.grey(timestamp('HH:mm:ss'))+']';
}
Issue Analytics
- State:
- Created 7 years ago
- Reactions:1
- Comments:8 (5 by maintainers)
Top Results From Across the Web
Chalk - npm
Specifies the level of color support. Color support is automatically detected, but you can override it by setting the level property. You should ......
Read more >chalk - Error [ERR_REQUIRE_ESM]: require() of ES Module
If you want to use Chalk with TypeScript or a build tool, ... async function main(){ console.log((await chalk()).gray(">", ...commands)); }.
Read more >How to use the chalk.dim function in chalk - Snyk
To help you get started, we've selected a few chalk.dim examples, based on popular ways it is used in public projects.
Read more >How to: Use Chalk Paint® On Kitchen Cabinets - Annie Sloan
Step by step guide to painting kitchen cupboards with Chalk Paint®. First, remove the doors and any hardware from your cabinets. Give them...
Read more >Remove Quilting Lines Left By Chalk Markers
Is there a safe way to remove the chalk marks as soon as I complete a block so the chalk is not sitting...
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
Strange. Ill take a look soon (I’m on the road at the moment).
As a temporary workaround you can do
chalk.grey = chalk.gray
. That should fix it.No problem! Glad it was resolved 👯