facebook / react-native

A framework for building native applications using React
https://reactnative.dev
MIT License
118.53k stars 24.28k forks source link

bundling failed: TypeError [ERR_INVALID_ARG_TYPE]: Th e "path" argument must be of type string. Received type boolean/ react native 0.60.4 #25976

Closed shanematte closed 5 years ago

shanematte commented 5 years ago

Hello. Help or who knows prompt how to solve a problem. Updated rect-native for old project (using babel-plugin-module-resolver). An error occurs.

react native 0.60.4

bundling failed: TypeError [ERR_INVALID_ARG_TYPE]: Th e "path" argument must be of type string. Received type boolean

2 days to solve the problem. There are several issues, but they do not help. They suggest to install the version 0.58.x but 64bit support comes with 0.59.x.

By the way if you run the application for the test (app-component-test.js) <View><Text>started app</Text></View> Everything works. But as I connect the directory with my application (/src), this error occurs.

list of modules that I use

    "@shoutem/theme": "^0.11.3",
    "apisauce": "^1.0.3",
    "appcenter": "^2.2.0",
    "google-libphonenumber": "^3.2.3",
    "i": "^0.3.6",
    "intl": "^1.2.5",
    "prop-types": "^15.7.2",
    "react": "16.8.6",
    "react-native": "0.60.4",
    "react-native-camera": "^3.0.1",
    "react-native-code-push": "^5.6.1",
    "react-native-contacts": "^5.0.2",
    "react-native-device-info": "^2.3.2",
    "react-native-easy-toast": "^1.2.0",
    "react-native-gifted-chat": "^0.9.11",
    "react-native-i18n": "^2.0.15",
    "react-native-image-crop-picker": "^0.25.0",
    "react-native-image-gallery": "^2.1.5",
    "react-native-interactable": "^1.0.0",
    "react-native-loader": "^1.2.1",
    "react-native-maps": "^0.25.0",
    "react-native-modal": "^11.3.1",
    "react-native-modal-datetime-picker": "^7.5.0",
    "react-native-modal-wrapper": "^3.1.1",
    "react-native-onesignal": "^3.3.1",
    "react-native-picker-select": "^6.3.0",
    "react-native-popover-tooltip": "^1.1.4",
    "react-native-popup-menu": "^0.15.6",
    "react-native-qrcode-svg": "^5.1.2",
    "react-native-simple-toast": "^0.1.1",
    "react-native-snap-carousel": "^3.8.0",
    "react-native-star-rating": "^1.1.0",
    "react-native-svg": "^9.6.2",
    "react-native-vector-icons": "^6.6.0",
    "react-native-video": "^5.0.0",
    "react-navigation": "^2.18.0",
    "react-redux": "^7.1.0",
    "reactotron": "^0.9.0",
    "reactotron-react-native": "^3.6.4",
    "reactotron-redux": "^3.1.1",
    "redux": "^4.0.4",
    "redux-form": "^8.2.5",
    "redux-logger": "^3.0.6",
    "redux-persist": "^5.10.0",
    "redux-saga": "^1.0.5",
    "redux-saga-routines": "^3.2.0",
    "socket.io-client": "^2.2.0",
    "underscore": "^1.9.1"
  },
  "devDependencies": {
    "@babel/core": "^7.5.5",
    "@babel/runtime": "^7.5.5",
    "@react-native-community/eslint-config": "^0.0.5",
    "babel-jest": "^24.8.0",
    "babel-plugin-module-resolver": "^3.2.0",
    "eslint": "^6.1.0",
    "jest": "^24.8.0",
    "metro-react-native-babel-preset": "^0.55.0",
    "react-test-renderer": "16.8.6"
  },

babel.config.js

module.exports = {
  "presets": ["module:metro-react-native-babel-preset"],
  "plugins": [
    [
      "module-resolver",
      {
        "root": ["./src"],
        "extensions": [".js"]
      }
    ]
  ]
};
react-native-bot commented 5 years ago

We are automatically closing this issue because it does not appear to follow any of the provided issue templates.

👉 Click here if you want to report a reproducible bug or regression in React Native.