所以我正在测试我的react-native应用程序,但它给了我这个警告:
AsyncStorage has been extracted from react-native core and will be removed in a future release. It can now be installed and imported from '@react-native-async-storage/async-storage' instead of 'react-native'. See https://github.com/react-native-async-storage/async-storage
注意:我没有在任何地方使用它,我没有导入,但它仍然在启动时给我这个警告
package.json:
{
"name": "tea-share",
"version": "1.0.0",
"main": "node_modules/expo/AppEntry.js",
"private": true,
"scripts": {
"start": "expo start",
"android": "expo start --android",
"ios": "expo start --ios",
"web": "expo start --web",
"eject": "expo eject"
},
"dependencies": {
"@expo/vector-icons": "^13.0.0",
"@react-native-async-storage/async-storage": "~1.17.3",
"@react-native-community/async-storage": "^1.12.1",
"@react-navigation/bottom-tabs": "^6.3.1",
"@react-navigation/native": "^6.0.10",
"@react-navigation/stack": "^6.2.1",
"@sanity/client": "^3.3.0",
"@sanity/form-builder": "^2.30.0",
"@sanity/image-url": "^1.0.1",
"expo": "~45.0.0",
"expo-image-picker": "~13.1.1",
"expo-status-bar": "~1.3.0",
"expo-updates": "^0.13.1",
"firebase": "^8.2.3",
"react": "17.0.2",
"react-dom": "17.0.2",
"react-hot-toast": "^2.2.0",
"react-native": "0.68.2",
"react-native-gesture-handler": "~2.2.1",
"react-native-image-picker": "^4.8.3",
"react-native-safe-area-context": "4.2.4",
"react-native-screens": "~3.11.1",
"react-native-toast-message": "^2.1.5",
"react-native-vector-icons": "^9.1.0",
"react-native-web": "0.17.7",
},
"devDependencies": {
"@babel/core": "^7.12.9"
},
}
有人能帮忙吗。
1条答案
按热度按时间moiiocjp1#
如果您不在任何地方使用它,请删除此行
"@react-native-community/async-storage": "^1.12.1",
并运行"rm -rf yarn.lock node_modules ios/Pods ios/Podfile.lock && yarn install && cd ios && pod install && cd .."