Marak / colors.js

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

undefined is not an object (evaluating 'argv.indexOf') #194

Closed ahmdsdk closed 6 years ago

ahmdsdk commented 7 years ago

I'm trying to use colors in my logs but when I try to require ('colors') to my app I get this error... I'm using it with react native, what could be the problem?

xahon commented 7 years ago

have same problem too

jniac commented 6 years ago

same problem here,

this should be a react issue, where process.argv is undefined a quick fix: change line 26 of 'node_modules/colors/lib/systemsupports-colors.js'

var argv = process.argv || [];

DABH commented 6 years ago

This will be fixed with #172 -- closing this for now, feel free to follow the discussion on that PR. Thanks!!