Marak / colors.js

get colors in your node.js console
https://github.com/Marak/colors.js
Other
5.16k stars 446 forks source link

how to use brightColors in nodjs? #278

Open kkm opened 3 years ago

kkm commented 3 years ago

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

gumbol commented 2 years ago

what error do you get?

kkm commented 2 years ago

it shows in "undefined" only. @gumbol

gumbol commented 2 years ago

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

LoranRendel commented 2 years ago

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

hootigger commented 2 years ago

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!