#react-native #react-redux #react-native-android
Вопрос:
Я сбросил метро, но происходит та же проблема. Как я могу решить эту проблему? Та же проблема возникает, когда я меняю порт. Я столкнулся с той же проблемой, когда перестраивал проект.
{
"name": "meal",
"version": "0.0.1",
"private": true,
"scripts": {
"android": "react-native run-android",
"ios": "react-native run-ios",
"start": "react-native start",
"test": "jest",
"lint": "eslint ."
},
"dependencies": {
"@react-native-community/masked-view": "^0.1.11",
"@react-native-firebase/app": "^12.4.0",
"@react-native-firebase/database": "^12.4.0",
"@react-native-firebase/firestore": "^12.4.0",
"@react-native-firebase/messaging": "^12.4.0",
"@react-native-firebase/storage": "^12.4.0",
"@react-native-picker/picker": "^1.16.3",
"@react-navigation/bottom-tabs": "^5.11.11",
"@react-navigation/drawer": "^5.12.5",
"@react-navigation/native": "^5.9.4",
"@react-navigation/stack": "^5.14.5",
"@reduxjs/toolkit": "^1.6.0",
"add": "^2.0.6",
"babel-preset-react-native": "^5.0.2",
"firebase-admin": "^9.11.0",
"lottie-react-native": "^4.0.2",
"moment": "^2.29.1",
"react": "17.0.1",
"react-dom": "^17.0.2",
"react-icons": "^4.2.0",
"react-is": "^17.0.2",
"react-native": "0.64.1",
"react-native-animated-loader": "^0.0.9",
"react-native-chart-kit": "^6.11.0",
"react-native-checkbox-selection": "^1.1.0",
"react-native-date-picker": "^3.3.2",
"react-native-dropdown-picker": "^5.1.21",
"react-native-elements": "^3.4.1",
"react-native-gesture-handler": "^1.10.3",
"react-native-image-picker": "^4.0.3",
"react-native-navigation-bar-color": "^2.0.1",
"react-native-picker-select": "^8.0.4",
"react-native-push-notification": "^7.4.0",
"react-native-reanimated": "^2.0.0",
"react-native-router-flux": "^3.45.0",
"react-native-safe-area-context": "^3.2.0",
"react-native-screens": "^3.3.0",
"react-native-splash-screen": "^3.2.0",
"react-native-svg": "^12.1.1",
"react-native-vector-icons": "^8.1.0",
"react-redux": "^7.2.4",
"yarn": "^1.22.11"
},
"devDependencies": {
"@babel/core": "^7.12.9",
"@babel/highlight": "^7.14.5",
"@babel/runtime": "^7.12.5",
"@react-native-community/eslint-config": "^2.0.0",
"babel-jest": "^26.6.3",
"eslint": "7.14.0",
"jest": "^26.6.3",
"metro-react-native-babel-preset": "^0.64.0",
"react-test-renderer": "17.0.1"
},
"jest": {
"preset": "react-native"
}
}
Комментарии:
1. В чем ошибка, которую вы получаете?
2. Ошибка типа: _chalk.конструктор не является конструктором в getChalk
3. можете ли вы проверить и подтвердить, что ваш сервер metro работает во время появления этой ошибки?
4. Удалите node_modules и package-lock.json. Установите все свежее, и оно должно работать.
Ответ №1:
Удалите node_modules и package-lock.json. Установите все свежее, и оно должно работать.