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

Cannot read 'hex' of undefined #214

Open
sclavijo93 opened this issue Sep 23, 2020 · 11 comments
Open

Cannot read 'hex' of undefined #214

sclavijo93 opened this issue Sep 23, 2020 · 11 comments

Comments

@sclavijo93
Copy link

sclavijo93 commented Sep 23, 2020

Hi, I'm getting this error when importing * as Progress in my app

import * as Progress from 'react-native-progress';
.
.
.
 <Progress.Bar progress={0.3} width={200} />
Error: Requiring module "node_modules/@react-native-community/art/lib/Group.js", which threw an exception: TypeError: Cannot read property 'hex' of undefined.

TypeError: Cannot read property 'hex' of undefined

React Native: 0.63
Progress: 4.1.2
Art: 1.2.0

@spyshower
Copy link

same

@RakshithD
Copy link

Facing the same issue.

@cheepion
Copy link

i' m add yarn add @react-native-community/art and use the other components like Progress.Circle
it's work for me

@CXZ7720
Copy link

CXZ7720 commented Nov 17, 2020

#214 (comment)

@Tankbt 's solution works nicely!!

My environments are

"react": "16.13.1",
"react-native": "0.63.3",

@sagarshakya
Copy link

sagarshakya commented Dec 13, 2020

Linking ReactNative ART by running react-native link @react-native-community/art solved the issue for me.

@gandarain
Copy link

gandarain commented Dec 16, 2020

i' m add yarn add @react-native-community/art and use the other components like Progress.Circle
it's work for me

This solution not working for me, any idea?

I get error, when I running my test file

TypeError: Cannot read property 'hex' of undefined

I am using Progress.Bar like this,

<Progress.Bar borderRadius={0} progress={timer === 3 ? 0.2 : timer === 2 ? 0.5 : 0.9} width={responsiveWidth(100)} color={color.thema} />

My environments are

"react-native": "^0.63.2",
"react-native-progress": "^4.1.2",
"@react-native-community/art": "^1.2.0",

@chamaldesilva
Copy link

i' m add yarn add @react-native-community/art and use the other components like Progress.Circle
it's work for me

This solution not working for me, any idea?

I get error, when I running my test file

TypeError: Cannot read property 'hex' of undefined

I am using Progress.Bar like this,

<Progress.Bar borderRadius={0} progress={timer === 3 ? 0.2 : timer === 2 ? 0.5 : 0.9} width={responsiveWidth(100)} color={color.thema} />

My environments are

"react-native": "^0.63.2",
"react-native-progress": "^4.1.2",
"@react-native-community/art": "^1.2.0",

same error

@TheFrostage
Copy link

Don't forget to install pods for ios after installing react-native-art. I didn't see that setup step in the docs but it is required.

@tareqdayya
Copy link

tareqdayya commented Jan 13, 2021

Fixed by downgrading @react-native-community/art to 1.1.0

@mcraigie
Copy link

I got this message when I forgot to do a pod install after adding ReactNativeART (yarn add @react-native-community/art)

$ cd ~/Workspace/AppName
$ npx pod-install ios
npx: installed 1 in 3.023s
Scanning for pods...
1.9.3
> pod install
...
Analyzing dependencies
Downloading dependencies
Installing ReactNativeART (1.2.0)
Generating Pods project
Integrating client project
Pod installation complete! There are # dependencies from the Podfile and # total pods installed.

@LukeAveil
Copy link

any solution to this?

I get the same error when running Jest.

Tried the all the above but nothing works

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests