Monte9 / react-native-ratings

Tap and Swipe Ratings component for React Native.
https://expo.io/@monte9/react-native-ratings
MIT License
907 stars 196 forks source link

Images folder does not exist in dist #145

Closed sshivananda closed 3 years ago

sshivananda commented 3 years ago

Introduced in 8.0.1

error Unable to resolve module `./images/star.png` from `node_modules/react-native-ratings/dist/SwipeRating.js`: 
legaciespanda commented 3 years ago

To resolve this issue @sshivananda @jlee0831 @SimenB @chicrock @benwiebe

STEP 1 Goto yourAppFolder/node_modules\react-native-ratings\dist\SwipeRating.js replace line 5 -8 with the code below

const STAR_IMAGE = require("../src/images/star.png");
const HEART_IMAGE = require("../src/images/heart.png");
const ROCKET_IMAGE = require("../src/images/rocket.png");
const BELL_IMAGE = require("../src/images/bell.png");

STEP 2 Goto yourAppFolder/node_modules\react-native-ratings\dist\components\Star.js replace line 3 -4 with the code below

const STAR_IMAGE = require("../../src/images/airbnb-star.png");
const STAR_SELECTED_IMAGE = require("../../src/images/airbnb-star-selected.png");

Problem solved.

This issue should be fixed soon

khushal87 commented 3 years ago

I will have a look at this @sshivananda Can you explain the steps to reproduce?

slasho commented 3 years ago

I will have a look at this @sshivananda Can you explain the steps to reproduce?

yarn add react-native-ratings

import it and you got the error

MBach commented 3 years ago

Just tried with 8.0.2 release, with cleaned folders (node_modules / android build), the bug is still here.

sshivananda commented 3 years ago

@MBach can you try with v8.0.3 - I think it was an issue with the way the package was published : I republished it again

MBach commented 3 years ago

Seems fine with v8.0.3!