Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

color(...).darken(...).hex is not a function #1354

Closed
ekimlinger opened this issue Nov 9, 2017 · 5 comments
Closed

color(...).darken(...).hex is not a function #1354

ekimlinger opened this issue Nov 9, 2017 · 5 comments
Assignees

Comments

@ekimlinger
Copy link

ekimlinger commented Nov 9, 2017

react-native, react and native-base version

Most current versions

Actual behaviour

Error saying: color(...).darken(...).hex is not a function

Steps to reproduce (code snippet or screenshot)

Attempt to use any one of the provided example themes provided by NativeBase

Is the bug present in both ios and android or in any one of them?

Both

Any other additional info which would help us debug the issue quicker.

The 'color' npm package uses a .hexString() function instead of .hex(). Not sure when this was changed.

Fix:

Find all the .hex() functions in the variables folders and replace them with .hexString()

@fmoessle
Copy link

Same here

@SupriyaKalghatgi
Copy link
Contributor

@ekimlinger @fmoessle Can you share your package.json here
Also try deleting node_modules and yarn.lock
Then run yarn

@SupriyaKalghatgi SupriyaKalghatgi self-assigned this Nov 13, 2017
@fmoessle
Copy link

Found the problem. Npm installs a different version of the color-package then yarn. Using Npm instead of yarn solved my problem :)

@SupriyaKalghatgi
Copy link
Contributor

@fmoessle Good to know that

@tmaly1980
Copy link

Weird, there's no hexString() in the most recent version of 'color', it seems to be called hex() again.

@GeekyAnts GeekyAnts locked as resolved and limited conversation to collaborators Apr 23, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants