expo start error:vector-icons/MaterialCommunityIcons` could not be found

I use: react native 0.67.4. Without using Expo, react native start is normal. However, after I converted to an Expo workflow, the following error occurred in Expo start:

While resolving module `@expo/vector-icons/MaterialCommunityIcons`, the Haste package `@expo` was found. However the module `vector-icons/MaterialCommunityIcons` could not be found within the package. Indeed, none of these files exist:

My method of converting Expo is to copy the original project after initializing the empty project, including package js。 Does anyone know how to deal with this problem

I have tried the following:

  1. Use @expo/vector icons

  2. Delete node_ Modules, reinstall

I found a case that there was a problem with version 0.52. Some things were deleted, but there was no such file on 0.67.

Have you met anyone?

my package.js

{
  "name": "tmp",
  "version": "1.0.0",
  "main": "node_modules/expo/AppEntry.js",
  "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",
    "@invertase/react-native-apple-authentication": "^2.2.1",
    "@react-native-async-storage/async-storage": "~1.17.3",
    "@react-native-community/geolocation": "^2.0.2",
    "@react-native-community/netinfo": "8.2.0",
    "@react-native-community/viewpager": "^5.0.11",
    "@react-native-firebase/app": "^14.5.1",
    "@react-native-firebase/auth": "^14.5.1",
    "@react-native-firebase/database": "^14.5.1",
    "@react-native-firebase/storage": "^14.5.1",
    "@react-native-google-signin/google-signin": "^7.2.2",
    "@react-native-picker/picker": "2.4.0",
    "@react-navigation/bottom-tabs": "6.2.0",
    "@react-navigation/native": "6.0.8",
    "@react-navigation/stack": "6.1.1",
    "api-ecommerce": "1.0.3",
    "base-64": "^1.0.0",
    "currency-formatter": "^1.5.4",
    "expo": "~45.0.0",
    "expo-dev-client": "^1.0.0",
    "expo-status-bar": "~1.3.0",
    "firebase": "9.6.8",
    "html-entities": "^2.3.2",
    "jetifier": "^2.0.0",
    "lodash": "4.17.21",
    "moment": "2.29.1",
    "oauth-1.0a": "^2.2.6",
    "react": "17.0.2",
    "react-dom": "17.0.2",
    "react-instantsearch": "6.22.0",
    "react-native": "0.68.2",
    "react-native-animatable": "1.3.3",
    "react-native-app-intro-slider": "4.0.4",
    "react-native-country-picker-modal": "^2.0.0",
    "react-native-drawer": "https://github.com/luyx2412/react-native-drawer.git",
    "react-native-fbsdk-next": "^7.3.3",
    "react-native-fluid-slider": "1.0.2",
    "react-native-gesture-handler": "~2.2.1",
    "react-native-image-picker": "^4.8.3",
    "react-native-image-zoom-viewer": "3.0.1",
    "react-native-iphone-x-helper": "^1.3.0",
    "react-native-keyboard-aware-scroll-view": "0.9.5",
    "react-native-linear-gradient": "^2.5.6",
    "react-native-loading-spinner-overlay": "^3.0.0",
    "react-native-localization": "^2.3.1",
    "react-native-masked-text": "1.13.0",
    "react-native-modalbox": "2.0.2",
    "react-native-onesignal": "3.9.3",
    "react-native-paper": "4.11.2",
    "react-native-radio-buttons": "1.0.0",
    "react-native-reanimated": "~2.8.0",
    "react-native-render-html": "4.2.4",
    "react-native-restart": "0.0.24",
    "react-native-safe-area-context": "4.2.4",
    "react-native-screens": "~3.11.1",
    "react-native-scrollable-tab-view": "^1.0.0",
    "react-native-snap-carousel": "3.9.1",
    "react-native-star-rating": "1.1.0",
    "react-native-swipe-list-view": "3.2.9",
    "react-native-swiper": "^1.6.0-nightly.5",
    "react-native-vector-icons": "^9.2.0",
    "react-native-web": "0.17.7",
    "react-native-webview": "11.18.1",
    "react-redux": "7.2.6",
    "redux": "4.1.2",
    "redux-actions": "2.6.5",
    "redux-persist": "^5.9.1",
    "redux-thunk": "2.4.1",
    "reselect": "4.1.5",
    "tcomb-form-native": "https://github.com/Vizir/tcomb-form-native.git",
    "tipsi-stripe": "^9.2.0",
    "urijs": "1.19.10",
    "validate.js": "0.13.1",
    "wpapi": "^1.2.1"
  },
  "devDependencies": {
    "@babel/core": "^7.12.9",
    "@babel/plugin-proposal-class-properties": "^7.14.5",
    "@babel/plugin-proposal-decorators": "^7.14.5",
    "@babel/runtime": "7.17.7",
    "@react-native-community/eslint-config": "^3.0.0",
    "babel-jest": "27.5.1",
    "babel-plugin-transform-remove-console": "^6.9.4",
    "eslint": "7.30.0",
    "eslint-config-airbnb": "^18.2.1",
    "eslint-plugin-import": "^2.23.4",
    "eslint-plugin-jsx-a11y": "^6.2.3",
    "eslint-plugin-react-hooks": "^4.2.0",
    "flow-bin": "^0.154.0",
    "jest": "27.5.1",
    "metro-react-native-babel-preset": "0.66.1",
    "react-test-renderer": "17.0.2",
    "reactotron-react-native": "5.0.1",
    "reactotron-redux": "3.1.3"
  },
  "private": true,
  "jest": {
    "preset": "react-native",
    "setupFiles": [
      "./node_modules/react-native-gesture-handler/jestSetup.js"
    ]
  }
}

others:

jsconfig:

{
    "compilerOptions": {
      "experimentalDecorators": true,
      "baseUrl": "./src/",
      "paths": {
        "@common": ["common"],
        "@containers": ["containers"],
        "@components": ["components"],
        "@navigation": ["navigation"],
        "@images": ["images"],
        "@services": ["services"],
        "@selectors": ["selectors"],
        "@store": ["store"],
        "@utils": ["utils"],
        "@expo": ["Expo"],
        "@redux": ["redux"],

        "@app/*": ["*"]
      }
    },
    "exclude": ["node_modules"]
  }

babel.config:

module.exports = function(api) {
  api.cache(true);
  return {
    presets: ['babel-preset-expo'],
    plugins: [
      ["@babel/plugin-proposal-decorators", { legacy: true }],
      "react-native-reanimated/plugin",
    ],
    env: {
      production: {
        plugins: ["react-native-paper/babel"],
      },
    }
  };
};

Hi @yfd

I think the problem is this line from jsconfig

thx :grinning:

I also think it’s the problem here. I just got the project maintenance, and I didn’t use Expo before. When i migrated, I used Expo init to create an empty project, and then copied the original code. This problem occurred in Expo start. I used the second method, and installed the Expo package according to the recommendations of the Expo document, but it was always stuck in splash, and there was no next step. There is no error prompt. Is there any way to see what happened?

Are you talking about when you build a production/preview build? Or with a dev client or Expo Go?

Maybe try https://docs.expo.dev/workflow/debugging/
Also see if the device logs give you more information about what is going wrong.

thx!, I used Expo client test my app. :innocent:

Based on your reply, I am not sure if you have fixed the problem (or if we are still talking about the same problem.)

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.