react-native-progress icon indicating copy to clipboard operation
react-native-progress copied to clipboard

Cannot read 'hex' of undefined

Open sclavijo93 opened this issue 5 years ago • 11 comments

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

sclavijo93 avatar Sep 23 '20 21:09 sclavijo93

same

spyshower avatar Nov 02 '20 13:11 spyshower

Facing the same issue.

RakshithD avatar Nov 10 '20 13:11 RakshithD

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

cheepion avatar Nov 13 '20 07:11 cheepion

https://github.com/oblador/react-native-progress/issues/214#issuecomment-726568864

@Tankbt 's solution works nicely!!

My environments are

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

CXZ7720 avatar Nov 17 '20 18:11 CXZ7720

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

sagarshakya avatar Dec 13 '20 12:12 sagarshakya

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",

gandarain avatar Dec 16 '20 10:12 gandarain

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

chamaldesilva avatar Dec 21 '20 12:12 chamaldesilva

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.

TheFrostage avatar Jan 06 '21 11:01 TheFrostage

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

tareqdayya avatar Jan 13 '21 13:01 tareqdayya

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.

mcraigie avatar Jan 24 '21 03:01 mcraigie

any solution to this?

I get the same error when running Jest.

Tried the all the above but nothing works

LukeAveil avatar May 03 '22 11:05 LukeAveil