-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
ERROR TypeError: Cannot read property 'style' of undefined, js engine: hermes #1017
Comments
Although this is not a fundamental solution, I will write a method to resolve and execute the error. In “node_module/react-native-snap-carousel You have to wait for the version to be updated. Translated with DeepL.com (free version) 根本的な解決にはなりませんが、エラーを解消し実行する方法を書きます。 「node_module/react-native-snap-carousel」内の バージョンアップされるのを待つしかないです。 |
Unfortunately, this method did not work, it causes another error. |
1- Import ViewStyle from react-native. 2- Replace |
This solved my problem , thank you man! |
how exactly does one patch a package? |
I am facing the same issue |
look at the doc patch-package |
already fix this problem ? if you fix please help me |
react-native-snap-carousel+3.9.1.patch |
thanks, my issue is resolved |
@aguidad solution works, thank you |
Use the patch file from meliorence/react-native-snap-carousel#1017 (comment) to fix broken package until update.
Thts cool
…On Wed, 5 Jun 2024, 2:06 am rmelara-designli, ***@***.***> wrote:
@aguidad <https://github.com/aguidad> solution works, thank you
—
Reply to this email directly, view it on GitHub
<#1017 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACZCYSUE5LWUGGNX5YVMJZDZFYT5LAVCNFSM6AAAAABHYDSECGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNBYGQYTMNJUHA>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
After updating my Expo version and other packages, I get this error in Carousel.js;
I'm sure the error is here because when I remove it from the project, there is no problem. Even if it is installed in the project, it is not a problem, but when I run my code, it gives an error.
Here is my code;
`
import React, { useState } from "react";
import { View, StyleSheet, Platform } from "react-native";
import Carousel, { Pagination } from "react-native-snap-carousel";
import Metrics from "../../styles/Dimensions";
const Slider = (props) => {
const [activeSlide, setActiveSlide] = useState(0);
const [data, setData] = useState(props.slideDatas);
const _renderItem = ({ item, index }) => {
return {item.component};
};
const pagination = () => {
return (
<Pagination
dotsLength={data.length}
activeDotIndex={activeSlide}
containerStyle={{
backgroundColor: "transparent",
}}
dotStyle={{
width: 10,
height: 10,
borderRadius: 5,
backgroundColor: "#D6B87C",
}}
inactiveDotStyle={{
backgroundColor: "#D6B87C",
}}
inactiveDotOpacity={0.4}
inactiveDotScale={0.6 * Metrics.horizontalScale}
/>
);
};
return (
<Carousel
layout={props.assets ? "stack" : "default"}
data={data}
renderItem={_renderItem}
sliderWidth={373 * Metrics.horizontalScale}
itemWidth={327 * Metrics.horizontalScale}
onSnapToItem={(index) => setActiveSlide(index)}
/>
<View
style={{ }}
>
{pagination()}
);
};
export default Slider;
`
Here is the error;
ERROR TypeError: Cannot read property 'style' of undefined, js engine: hermes
The text was updated successfully, but these errors were encountered: