splinetool / react-spline

React component for Spline scenes.
MIT License
1.1k stars 54 forks source link

Unable to resolve "react-merge-refs" from "node_modules/@splinetool/react-spline/dist/ParentSize.js" #189

Open gameveloster opened 2 weeks ago

gameveloster commented 2 weeks ago
import Spline from '@splinetool/react-spline';

export default function MyScreen() {
  return (
    <View>
      <Spline scene="https://prod.spline.design/6Wq1Q7YGyM-iab9i/scene.splinecode" />
    </View>
  );
}

Starting the Expo dev client app on Iphone with this screen will crash with error

iOS Bundling failed 3370ms node_modules/expo-router/entry.js (1532 modules)
Unable to resolve "react-merge-refs" from "node_modules/@splinetool/react-spline/dist/ParentSize.js"

I am using

├── @splinetool/react-spline@3.1.0
├── @splinetool/runtime@1.6.8
├── expo@51.0.13
├── react-native@0.74.2
├── react@18.2.0

Ideas? Thanks

marcofugaro commented 1 week ago

What package manager are you using? react-merge-refs is a dependency automatically installed with react-spline. Your package manager is not installing those.

You can workaround this by adding react-merge-refs as direct dependencies for now.

alexis2m commented 2 days ago

Workaround not work every time with npm