EAS preview crashes when using @react-native-community/slider without explicit install
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 35/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Estancado
- Stack tecnológico
- react-native, typescript
- Área
- mobile
Línea de trabajo
No se nombra ningún archivo del repositorio, prueba ni punto de entrada. Empieza reproduciendo el uso mínimo de Slider en un proyecto de Expo con Expo Go o un development build y, después, un EAS preview build; estará terminado cuando el standalone build ya no se cierre silenciosamente al usar Slider.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Environment
- react-native info output:
System:
OS: macOS (Apple Silicon)
Binaries:
Node: 20.x
SDKs:
iOS SDK: Xcode 15.x
npmPackages:
react: 19.1.0
react-native: 0.81.5
@react-native-community/slider: ^5.0.1
-
are you using the new architecture?
Yes (Expo SDK 54 with Hermes enabled) -
which version of react & react-native are you using?
react: 19.1.0
react-native: 0.81.5
Description
When using @react-native-community/slider in an Expo project:
-
The app works correctly in Expo Go / development build
-
The app crashes immediately in an EAS preview / standalone build
-
No JS error is shown; the app exits silently
This happens even with a minimal usage of the Slider component.
Commenting out the Slider component makes the preview build work again.
The issue appears to be that Expo Go includes the native module by default, while standalone builds require the package to be explicitly installed and prebuilt. This difference is not obvious and leads to a runtime crash.
Reproducible Demo
import React, { useEffect, useRef, useState } from "react";
import {
View,
Text,
StyleSheet,
Animated,
ActivityIndicator,
} from "react-native";
import Slider from "@react-native-community/slider";
import { useFormContext } from "react-hook-form";
import { colors, Fonts } from "@/constants/theme";
import CurrencyPicker from "@/components/CurrencyPicker";
import { FormTextInput } from "@/components/shared/FormTextInput";
import { CURRENCIES } from "@/utils/currencies";
import type {
Tier,
FormValues,
} from "@/types/donation/types";
type Props = {
tiers: Tier[];
paymentTab: "monthly" | "onetime";
isCheckingMinimum?: boolean;
helperText?: string;
};
export default function TierSlider({
tiers,
paymentTab,
isCheckingMinimum,
helperText,
}: Props) {
const { setValue, clearErrors, control } =
useFormContext<FormValues>();
const [index, setIndex] = useState(0);
const tier = tiers[index];
const opacity = useRef(new Animated.Value(1)).current;
const amountField =
paymentTab === "monthly" ? "monthlyAmount" : "oneTimeAmount";
const currencyField =
paymentTab === "monthly" ? "monthlyCurrencyId" : "oneTimeCurrencyId";
useEffect(() => {
Animated.sequence([
Animated.timing(opacity, {
toValue: 0,
duration: 120,
useNativeDriver: true,
}),
Animated.timing(opacity, {
toValue: 1,
duration: 180,
useNativeDriver: true,
}),
]).start();
setValue(amountField, String(tier.amount), {
shouldDirty: true,
shouldValidate: true,
});
clearErrors();
}, [index, tier.amount, amountField, setValue, clearErrors, opacity]);
if (!tiers || tiers.length === 0) {
console.error("DONATE_TIERS is empty!");
return null;
}
return (
<View style={styles.card}>
{/* IMAGE */}
<View style={styles.imageWrapper}>
<Animated.Image
source={tier.image}
style={[styles.image, { opacity }]}
resizeMode="cover"
/>
</View>
{/* CONTENT */}
<View style={styles.content}>
<Text style={styles.title}>{tier.title}</Text>
<Text style={styles.desc}>
This can support {tier.soldiers} PDF soldier
{tier.soldiers > 1 ? "s" : ""} for 1 month.
</Text>
{/* SLIDER */}
<View style={styles.sliderWrapper}>
<Slider
style={{ height: 40 }}
minimumValue={0}
maximumValue={tiers.length - 1}
step={1}
value={index}
onValueChange={setIndex}
onSlidingComplete={(value) => {
setIndex(value);
}}
minimumTrackTintColor={colors.orange[500]}
maximumTrackTintColor="#120A06"
thumbTintColor={colors.orange[400]}
tapToSeek
accessibilityLabel="Donation tier selector"
accessibilityValue={{
min: 0,
max: tiers.length - 1,
now: index,
text: `${tier.title}, ${tier.amount}`,
}}
/>
<View style={styles.dots}>
{tiers.map((_, i) => (
<View key={i} style={styles.dot} />
))}
</View>
</View>
{/* AMOUNT + CURRENCY (INSIDE CARD) */}
<View style={styles.amountRow}>
<View style={{ flex: 0.6 }}>
<FormTextInput
name={amountField}
keyboardType="numeric"
placeholder="Enter amount"
helperText={helperText}
helperTextColor={colors.primary[500]}
/>
{isCheckingMinimum && (
<ActivityIndicator size="small" color={colors.gray[400]} />
)}
</View>
<View style={{ flex: 0.4 }}>
<CurrencyPicker
name={currencyField}
control={control}
data={CURRENCIES}
placeholder="Currency"
/>
</View>
</View>
</View>
</View>
);
}
const styles = StyleSheet.create({
card: {
borderRadius: 22,
backgroundColor: "#1A0F0A",
overflow: "hidden",
borderWidth: 1.5,
borderColor: "#2A1A12",
},
imageWrapper: {
height: 260,
},
image: {
width: "100%",
height: "100%",
},
content: {
padding: 16,
},
title: {
textAlign: "center",
color: colors.primary[500],
fontSize: Fonts.size.lg,
fontWeight: Fonts.weight.semibold,
},
desc: {
textAlign: "center",
marginTop: 6,
color: colors.gray[400],
fontSize: Fonts.size.sm,
},
sliderWrapper: {
marginTop: 14,
},
dots: {
flexDirection: "row",
justifyContent: "space-between",
paddingHorizontal: 10,
marginTop: -4,
},
dot: {
width: 6,
height: 6,
borderRadius: 3,
backgroundColor: "#3A2A20",
},
activeDot: {
backgroundColor: colors.orange[500],
},
amountRow: {
flexDirection: "row",
gap: 8,
marginTop: 16,
},
});
- Lenguaje dominante
- TypeScript
- Estrellas
- 1.4k
- Forks
- 296
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de callstack/react-native-slider
-
Web: value={0} with a negative minimumValue renders the thumb at the minimumPosiblemente ocupada @huytdps13400 la tomó hace 4 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
callstack/react-native-slider#828 ·
-
Missing peerDependencies for react and react-native causes duplicate React instances in pnpm monoreposPosiblemente ocupada @patrickwehbe la tomó hace 108 días. Abiertobug report
Dificultad 1/5 Menos de una hora Aptitud para principiantes 68/100
callstack/react-native-slider#769 ·
-
bug report platform: iOS v6
Dificultad 4/5 3-5 días Aptitud para principiantes 42/100
callstack/react-native-slider#782 · 6 comentarios ·
-
iOS: negative min value and 0 as maximum value turns maximum to 1Posiblemente ocupada @huytdps13400 la tomó hace 2 días. Abiertobug report
Dificultad 3/5 1-2 días Aptitud para principiantes 65/100
callstack/react-native-slider#780 · 1 comentario ·
-
bug report platform: iOS
Dificultad 4/5 3-5 días Aptitud para principiantes 45/100
callstack/react-native-slider#758 · 4 comentarios ·
Todos los issues de callstack/react-native-slider
Issues similares
-
triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
github/docs#46222 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
agent-ready area: config area: skills type: chore upstream: brain-kit
Dificultad 1/5 Menos de una hora Aptitud para principiantes 95/100
-
enhancement priority:low ready-for-dev
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
Los mantenedores suelen responder en 1 día
-
bug escritorio mapa
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
marcosferr/reporte-ciudadano#4 · 1 comentario ·
-
area: material/sort gemini-triaged needs triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
angular/components#33933 ·
Los mantenedores suelen responder en 1 día