colors.js icon indicating copy to clipboard operation
colors.js copied to clipboard

how to use brightColors in nodjs?

Open kkm opened this issue 3 years ago • 5 comments

console.log("bright color".brightBlue) ==> doesnt work, but how to use this code?

kkm avatar Mar 15 '21 03:03 kkm

what error do you get?

gumbol avatar Sep 06 '21 16:09 gumbol

it shows in "undefined" only. @gumbol

kkm avatar Oct 06 '21 02:10 kkm

@kkm i cant replicate the issue. what type of os and terminal are you using? and could you add a screenshot of the error?

gumbol avatar Oct 06 '21 06:10 gumbol

The problem actually is missing TS definition for bright colors in index.d.ts and safe.d.ts

LoranRendel avatar Nov 23 '21 09:11 LoranRendel

in ts.

import colors = require('colors')
// important. it output `undefine` if not enable .
colors.enable()

// 
console.log(`[*] [${self.$className.bgRed} ${method}]`)

and works for me!

hootigger avatar Jan 03 '22 13:01 hootigger