VSCode仅建议来自`react-native/types` vs `react-native`的组件

ehxuflar  于 2023-03-31  发布在  React
关注(0)|答案(1)|浏览(222)

正如标题所示,我不确定是什么设置调整导致了这一点。如果我试图让自动完成来完成任何React Native组件,它只提供从react-native/types完成。以前有人经历过这种情况吗?以下是截图和我的package.json
我正在运行React Native:0.71.4博览会:48.0.9
package.json

"dependencies": {
    "@react-native-async-storage/async-storage": "^1.17.12",
    "@react-native-community/netinfo": "^9.3.7",
    "@react-navigation/bottom-tabs": "^6.5.7",
    "@react-navigation/native": "^6.1.6",
    "@react-navigation/native-stack": "^6.9.12",
    "@supabase/supabase-js": "^2.12.1",
    "@tanstack/react-query": "^4.28.0",
    "@testing-library/jest-native": "^5.4.2",
    "@testing-library/react-native": "^12.0.1",
    "@types/react": "~18.0.29",
    "date-fns": "^2.29.3",
    "eslint": "^8.36.0",
    "expo": "~48.0.9",
    "expo-haptics": "~12.2.1",
    "expo-image": "~1.0.0",
    "expo-image-picker": "~14.1.1",
    "expo-splash-screen": "~0.18.1",
    "expo-status-bar": "~1.4.4",
    "jest": "^29.2.1",
    "jest-expo": "^48.0.2",
    "lucide-react-native": "^0.127.0",
    "prettier": "^2.8.7",
    "react": "18.2.0",
    "react-native": "0.71.4",
    "react-native-gesture-handler": "^2.9.0",
    "react-native-reanimated": "^2.14.4",
    "react-native-safe-area-context": "4.5.0",
    "react-native-screens": "~3.20.0",
    "react-native-svg": "^13.8.0",
    "react-native-toast-message": "^2.1.6",
    "react-native-url-polyfill": "^1.3.0",
    "typescript": "^5.0.2"
  },
  "devDependencies": {
    "@babel/core": "^7.20.0",
    "@react-native-community/eslint-config": "^3.2.0",
    "@types/jest": "^29.5.0",
    "@typescript-eslint/eslint-plugin": "^5.56.0",
    "@typescript-eslint/parser": "^5.56.0",
    "eslint-plugin-import": "^2.27.5",
    "eslint-plugin-unused-imports": "^2.0.0"
  },

qq24tv8q

qq24tv8q1#

该问题与依赖关系有关。
运行expo doctor --fix-dependencies修复了我的自动完成问题。

相关问题