oblador / react-native-progress

Progress indicators and spinners for React Native
MIT License
3.63k stars 516 forks source link

Invariant Violation: ART has been removed from React Native. It can now be installed and imported from '@react-native-community/art' instead of 'react-native' #201

Open aithashi opened 4 years ago

aithashi commented 4 years ago
"react": "16.11.0",
"react-native": "0.62.2",

"react-native-progress": Tried : '^3.5.0' & '^4.1.2'

Tried : 'npm start --reset-cache' also installed : "@react-native-community/art"

Nothing Worked!

90felipe09 commented 4 years ago

Same issue.

Screen Shot 2020-04-24 at 10 17 28 AM
Aung-Myint-Thein commented 4 years ago

Have you guys solved this?

aithashi commented 4 years ago

@Aung-Myint-Thein Not sure what's the problem! Created a new fresh app of same version and used this library (^4.1.2) and it's working fine.

Note: Problem causes when I use or (U need to install 'React Native Art' for this) Currently I'm using only thus no issues.

HeffZilla commented 4 years ago

I was getting this error too until I upgraded react-native-progress from 3.5.0 to 4.1.2. Make sure to clear you node_modules and redownload dependencies.

vqthanh1412489 commented 4 years ago

in file Circle.js, CircleSnail.js , Pie.js, replace ART.Surface with import {Surface} from '@react-native-community/art'; and in file Shapes/Arc.js import {Shape, Path} from '@react-native-community/art'; and replace the same above.

m-czarnik commented 4 years ago

For anyone having this problem, there's a hint in the README.md

Note: If you don't want the ReactART based components and it's dependencies, do a deep require instead: import ProgressBar from 'react-native-progress/Bar';

It worked for me when all other methods failed.

HenryDewa commented 4 years ago

Screenshot_2020-07-15-00-11-54-85_f73b71075b1de7323614b647fe394240

Same Issue, have you guys solved this ?

virbo commented 4 years ago

this issue just on iOS and I solve with this steps

  1. install React Native Art
  2. running command pod install

Screen Shot 2020-07-15 at 11 21 51

rajeshwar4282 commented 4 years ago

Same issue.

Screen Shot 2020-04-24 at 10 17 28 AM

did you find any solution

rayashi commented 4 years ago

image I'm getting this error on bundler run, and the IOS simulator is blank

AhmedShaisha commented 4 years ago

Any package relies on ART will cause the issue with you , not only react-native-progress , but also packages with loaders like this react-native-loading-spinner-overlay , You can change this by finding another package of by fixing your imports

The Art library has been removed as of SDK 36 , If you need to use react-native-progress, which relies on ART, you can use the bare workflow and install @react-native-community/art, or implement your own progress indicator using Svg

PrantikMondal commented 3 years ago
"react": "16.11.0",
"react-native": "0.62.2",

"react-native-progress": Tried : '^3.5.0' & '^4.1.2'

Tried : 'npm start --reset-cache' also installed : "@react-native-community/art"

Nothing Worked!

I am not using this library but still facing the same issue. Is any solution on this?

aithashi commented 3 years ago

@PrantikMondal https://github.com/oblador/react-native-progress/issues/201#issuecomment-623287649 Tried this ?

PrantikMondal commented 3 years ago

@PrantikMondal #201 (comment) Tried this ?

Hi Aithashi, Thanks for the reply. I am not using this react-native-progress library at all. Started getting error after run this comment "npm audit fix".

LouisLeung commented 3 years ago

same issue

Invariant Violation: ART has been removed from React Native. It can now be installed and imported from '@react-native-community/art' instead of 'react-native'. See https://github.com/react-native-art/art

"@react-native-community/art": "^1.2.0", react-native-cli: 2.0.1 react-native: 0.64.0

ghasemikasra39 commented 3 years ago

I was getting this error too until I upgraded react-native-progress from 3.5.0 to 4.1.2. Make sure to clear you node_modules and redownload dependencies.

Did not work for me on RN 0.64.1

ghasemikasra39 commented 3 years ago

A combination of what @HeffZilla and @aithashi suggested worked for me, use the following:

  1. Delete the node_modules folder
  2. install "@react-native-community/art": "^1.2.0" (manually add to package.json file)
  3. Upgrade this package to "react-native-progress": "^4.1.2" version (manually change the version in package.json file)
  4. npm install
  5. npx react-native start --reset-cache (reset the cache, otherwise NOT gonna work)
  6. Enjoy
IM-CrazyDeveloper commented 3 years ago

Hi All, Facing this issue in RN upgrade 0.64.1 . I am using below configuration Xcode 12.4 node 10.0

Tried : 'npm start --reset-cache' also installed : "@react-native-community/art"

I have tried all suggestion provided in top, but no luck. Getting below error

Screenshot 2021-06-05 at 16 36 38
yogendrajs commented 3 years ago

Hi, any solution to this? I've been using https://www.npmjs.com/package/react-native-pie-chart which uses @react-native-community/art internally. I've tried all the above steps, but no luck!!

aithashi commented 3 years ago

Hi, any solution to this? I've been using https://www.npmjs.com/package/react-native-pie-chart which uses @react-native-community/art internally. I've tried all the above steps, but no luck!!

@yogendrajs https://github.com/oblador/react-native-progress/issues/201#issuecomment-842263220 This should work as per my knowledge (But I have not tried with RN 0.64+)

yogendrajs commented 3 years ago

@aithashi thanks for the response. I'm using RN 0.64.2. I've tried this & everything that's listed down here, but couldn't make it to work. Do you have any other possible workaround?

sumitg2386 commented 3 years ago

Please let me know is any solution to the issue.

ashishprasad2163 commented 2 years ago

@ghasemikasra39 answer worked for me as well. I'm using RN 0.65.0

venura-atlasopen commented 1 year ago

@IM-CrazyDeveloper @rayashi did you find a fix?

venura-atlasopen commented 1 year ago

For those having this issue, although it wasn't directly in our code ART was used by a library we were dependent on. So search for ART in your node modules. On VSCode deselect the gear in the 'files to exclude' text field so that the search includes settings and ignore files. Hope this helps.

Screenshot 2022-11-23 at 8 46 19 am