alexZajac / react-native-skeleton-content

A customizable skeleton-like loading placeholder for react native projects using expo.
https://www.npmjs.com/package/react-native-skeleton-content
MIT License
614 stars 134 forks source link

Expo SDK 43 #55

Closed adelbeke closed 2 years ago

adelbeke commented 2 years ago

Describe the bug Hello Alex,

This error comes when we want to use the package with Expo SDK 43, have you the possibility to fix it ?

Unable to resolve module @unimodules/core from /Users/arthurdelbeke/work/ko-app-expo/node_modules/react-native-skeleton-content/node_modules/expo-linear-gradient/build/NativeLinearGradient.ios.js: @unimodules/core could not be found within the project or in these directories:
  node_modules/react-native-skeleton-content/node_modules
  node_modules

If you are sure the module exists, try these steps:
 1. Clear watchman watches: watchman watch-del-all
 2. Delete node_modules and run yarn install
 3. Reset Metro's cache: yarn start --reset-cache
 4. Remove the cache: rm -rf /tmp/metro-*
> 1 | import { requireNativeViewManager } from '@unimodules/core';
    |                                           ^
  2 | const NativeLinearGradient = requireNativeViewManager('ExpoLinearGradient');
  3 | export default NativeLinearGradient;
  4 | //# sourceMappingURL=NativeLinearGradient.ios.js.map
Richard1984 commented 2 years ago

Same here

If you are sure the module exists, try these steps:
 1. Clear watchman watches: watchman watch-del-all
 2. Delete node_modules and run yarn install
 3. Reset Metro's cache: yarn start --reset-cache
 4. Remove the cache: rm -rf /tmp/metro-*
> 1 | import { requireNativeViewManager } from '@unimodules/core';
    |                                           ^
  2 | const NativeLinearGradient = requireNativeViewManager('ExpoLinearGradient');
  3 | export default NativeLinearGradient;
  4 | //# sourceMappingURL=NativeLinearGradient.ios.js.map
sayav commented 2 years ago

Looks like the issue is caused by expo-linear-gradient v9.2.0 using unimodules. Updating to the latest version fixes this. Might be a good idea to add both expo-linear-gradient and react-native-reanimated as peer dependancies.

For now feel free to use this fork: https://github.com/sayav/react-native-skeleton-content. yarn add react-native-skeleton-content@git://github.com/sayav/react-native-skeleton-content