Reputation: 3160
I want to downgrade my project as some of the third party packages are not updated with the latest version of react-native. I am using Xcode 9.0
When I try to downgrade my react-native version, I get this error:
error: /Users/........./node_modules/react-native/ReactCommon/privatedata/PrivateDataBase.h: No such file or directory
Points I followed:
In package.json
I changed the version from 0.51 to 0.45
Then run npm install.
Upvotes: 1
Views: 952
Reputation: 1634
If you change something in your package.json, make sure you delete also your package-lock.json.
I always execute after i change something the following script:
watchman watch-del-all 1>/dev/null
rm -rf node_modules 1>/dev/null
rm -rf yarn.lock 1>/dev/null
rm -rf package-lock.json 1>/dev/null
rm -rf $TMPDIR/react-packager-* 1>/dev/null
rm -rf ios/build 1>/dev/null
rm -rf android/build 1>/dev/null
npm cache clear --force -s 1>/dev/null
npm cache verify 1>/dev/null
from: https://gist.github.com/skizzo/8633169b4f1b0e781c83af4d52ec7249
If you still have some issues with version missmatch, try:
npm uninstall your-package-you-want-to-remove && npm install [email protected] (fixed version number)
react-native link
Upvotes: 1