mfrachet / rn-placeholder

🏖️ Display some placeholder stuff before rendering your text or media content in React Native
https://mfrachet.github.io/rn-placeholder/
MIT License
2.13k stars 183 forks source link

Can't install with react@^18.0.0 #210

Open diragb opened 2 years ago

diragb commented 2 years ago
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! 
npm ERR! While resolving: project@1.0.0
npm ERR! Found: react@18.0.0
npm ERR! node_modules/react
npm ERR!   react@"18.0.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react@"^16.13.1" from rn-placeholder@3.0.3
npm ERR! node_modules/rn-placeholder
npm ERR!   rn-placeholder@"*" from the root project
mfrachet commented 2 years ago

https://github.com/mfrachet/rn-placeholder/issues/179

triplumix commented 2 years ago

You can add these to package.json: image

It works for me!

technical-shoubhik commented 1 year ago

I'm getting this error on making those changes :(

Error: Unable to resolve module rn-placeholder from /home/expo/workingdir/build/screens/postDetail.js: rn-placeholder could not be found within the project or in these directories: 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-* 26 | Progressive, 27 | Fade,

    28 | } from "rn-placeholder"; | ^ 29 | 30 | const PostDetail = (props) => { 31 | const tw = useTailwind();

seriouscoderone commented 1 year ago

WORKAROUND:

Add this to your dependencies

"rn-placeholder": "https://github.com/mfrachet/rn-placeholder.git#d3d413a9303bc0f131b4dc30b7a3647aaedbe973"

that hash fixed the problem, but it looks like it was never published to npm