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

SkeletonPlaceholder.js seems to be importing "@react-native-community/masked-view" @ v4.0.0. #41

Open
sophie-li opened this issue May 3, 2021 · 18 comments

Comments

@sophie-li
Copy link

Got the following error on version 4.0.0

Unable to resolve module @react-native-community/masked-view from ... /lib/SkeletonPlaceholder.js: @react-native-community/masked-view could not be found within project

Screen Shot 2021-05-03 at 5 50 52 PM

Version: 4.0.0

@Sayon1992
Copy link

Sayon1992 commented May 5, 2021

Yeah, i've the same problem. expecting them to change to masked-view since it still has performance issues.

@misag777
Copy link

misag777 commented May 8, 2021

+1

@chramos
Copy link
Owner

chramos commented May 9, 2021

Hey guys, I'll check this

@diazdell91
Copy link

+1

@okimotoren
Copy link

okimotoren commented May 18, 2021

Hello, I had the same situation, and i solved it by the change below.

Solution:

in node_modules/react-native-skeleton-placeholder/lib/SkeletonPlaceholder.js

Screen Shot 2021-05-18 at 16 53 26

before : const masked_view_1 = __importDefault(require("@react-native-community/masked-view"));
after : const masked_view_1 = __importDefault(require("@react-native-masked-view/masked-view"));

It seemed to be happened with #37 .

I hope it could help someone.
@sophie-li @chramos

@rdgoutiyama
Copy link

I solved this issue with:

First, try to install:

yarn add @react-native-masked-view/masked-view

And run project. If an error occurs, like:

While trying to resolve module react-native-skeleton-placeholder from file xxxxx, ....

I make this pull request #50

@andreialecu
Copy link
Contributor

I think the npm publish was somehow messed up because:

https://cdn.jsdelivr.net/npm/[email protected]/lib/SkeletonPlaceholder.js (search for react-native-community here)

Does not match the source of https://github.com/chramos/react-native-skeleton-placeholder/blob/master/src/SkeletonPlaceholder.tsx.

@chramos mind publishing the library again?

@shikharsrivastava23
Copy link

Can someone clarify if we need @react-native-masked-view/masked-view or @react-native-community/masked-view? Having both in the package.json is causing mergeDex error when building for android.

@shikharsrivastava23
Copy link

Can someone clarify if we need @react-native-masked-view/masked-view or @react-native-community/masked-view? Having both in the package.json is causing mergeDex error when building for android.

I used @react-native-community/masked-view, seems to work fine for now.

@kimsean
Copy link

kimsean commented Jul 12, 2021

Can someone clarify if we need @react-native-masked-view/masked-view or @react-native-community/masked-view? Having both in the package.json is causing mergeDex error when building for android.

I have the same issue.

@MatiSera
Copy link

Hi! This fix will be uploaded? Because I'm still facing this error.

@andreialecu
Copy link
Contributor

Version 5.0 uses @react-native-masked-view/masked-view. You will need to remove the older (community) one.

@stoyan-frieze
Copy link

I think I am having conflict issues between @react-native-community/masked-view and @react-native-masked-view/masked-view - 'Invariant Violation: Tried to register two views with the same name RNCMaskedView, js engine: hermes' But I am using react-navigation which has @react-native-community/masked-view as a dependency so I can't remove it. Can they coexist? Surely, I am not the only person using react navigation.

@MaganAnkur
Copy link

I am getting the same error in version 5.

I have followed the below step

Installed Masked view and linear gradient libraries before

Below is SkeletonPlaceholder.js

const masked_view_1 = __importDefault(require("@react-native-masked-view/masked-view"));
const react_native_linear_gradient_1 = __importDefault(require("react-native-linear-gradient"));

But still I am getting below :
Error: Unable to resolve module @react-native-community/masked-view from node_modules/react-native-skeleton-placeholder/lib/SkeletonPlaceholder.js: @react-native-community/masked-view could not be found within the project.

@scblason
Copy link

Same issue here as @MaganAnkur

@felansu
Copy link

felansu commented Nov 10, 2021

more 1 here 🪂

@Choyeongdeok
Copy link

I think I am having conflict issues between @react-native-community/masked-view and @react-native-masked-view/masked-view - 'Invariant Violation: Tried to register two views with the same name RNCMaskedView, js engine: hermes' But I am using react-navigation which has @react-native-community/masked-view as a dependency so I can't remove it. Can they coexist? Surely, I am not the only person using react navigation.

I removed @react-native-masked-view/masked-view and restart then fix error

@sanoobpookodan
Copy link

Note: This package requires @react-native-masked-view/masked-view and react-native-linear-gradient

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