FortAwesome / react-native-fontawesome

Official React Native component for Font Awesome 5
MIT License
328 stars 53 forks source link

Failed to load configuration of your project. #140

Closed namastedating closed 2 years ago

namastedating commented 2 years ago

Describe the bug After installing following libraries

npm i --save @fortawesome/free-solid-svg-icons
npm i --save @fortawesome/free-brands-svg-icons
npm i --save @fortawesome/free-regular-svg-icons

I am getting following error

error Failed to load configuration of your project.
Error: Cannot find module '/Users/sandesh.vakale/Desktop/Namaste/node_modules/@fortawesome/free-brands-svg-icons/package.json.js'
    at createEsmNotFoundErr (node:internal/modules/cjs/loader:967:15)
    at finalizeEsmResolution (node:internal/modules/cjs/loader:960:15)
    at resolveExports (node:internal/modules/cjs/loader:488:14)
    at Module._findPath (node:internal/modules/cjs/loader:528:31)
    at Module._resolveFilename (node:internal/modules/cjs/loader:932:27)
    at Function.resolve (node:internal/modules/cjs/helpers:108:19)
    at resolveNodeModuleDir (/Users/sandesh.vakale/Desktop/Namaste/node_modules/@react-native-community/cli-tools/build/resolveNodeModuleDir.js:24:42)
    at /Users/sandesh.vakale/Desktop/Namaste/node_modules/@react-native-community/cli-config/build/loadConfig.js:93:76
    at Array.reduce (<anonymous>)
    at loadConfig (/Users/sandesh.vakale/Desktop/Namaste/node_modules/@react-native-community/cli-config/build/loadConfig.js:91:134)

Reproducible test case Install these libraries and run npx react-native run-android or npx react-native run-ios or npm start

Expected behavior Application Should start properly without any error.

Desktop (please complete the following information): MacBook Pro M1 Pro chip

  "name": "Namaste",
  "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 .",
    "generate": "npx react-native generate-bootsplash ./src/assets/icons/icon.png --background-color=FFFFFF   --logo-width=100 --assets-path=./src/assets/icons --flavor=main",
    "prepare": "husky install"
  },
  "dependencies": {
    "@fortawesome/fontawesome-svg-core": "^6.1.1",
    "@fortawesome/free-brands-svg-icons": "^6.1.1",
    "@fortawesome/free-regular-svg-icons": "^6.1.1",
    "@fortawesome/free-solid-svg-icons": "^6.1.1",
    "@fortawesome/react-native-fontawesome": "^0.3.0",
    "@react-native-async-storage/async-storage": "^1.17.7",
    "@react-native-picker/picker": "^2.4.2",
    "@react-navigation/native": "^6.0.11",
    "@react-navigation/stack": "^6.2.2",
    "@reduxjs/toolkit": "^1.8.3",
    "i18next": "^21.8.14",
    "react": "18.0.0",
    "react-i18next": "^11.18.1",
    "react-native": "0.69.1",
    "react-native-bootsplash": "^4.2.3",
    "react-native-gesture-handler": "^2.5.0",
    "react-native-reanimated": "^2.9.1",
    "react-native-safe-area-context": "^4.3.1",
    "react-native-screens": "^3.15.0",
    "react-native-svg": "^12.4.0",
    "react-native-ui-lib": "^6.18.1",
    "react-redux": "^8.0.2",
    "redux": "^4.2.0",
    "redux-logger": "^3.0.6",
    "redux-persist": "^6.0.0"
  },
  "devDependencies": {
    "@babel/core": "^7.12.9",
    "@babel/runtime": "^7.12.5",
    "babel-jest": "^26.6.3",
    "eslint": "^7.32.0 || ^8.2.0",
    "eslint-config-airbnb": "^19.0.4",
    "eslint-plugin-import": "^2.25.3",
    "eslint-plugin-jsx-a11y": "^6.5.1",
    "eslint-plugin-react": "^7.28.0",
    "eslint-plugin-react-hooks": "^4.3.0",
    "eslint-plugin-react-native": "^4.0.0",
    "husky": "^8.0.1",
    "jest": "^26.6.3",
    "lint-staged": "^13.0.3",
    "metro-react-native-babel-preset": "^0.70.3",
    "prettier": "2.7.1",
    "react-test-renderer": "18.0.0"
  },
  "jest": {
    "preset": "react-native"
  },
  "lint-staged": {
    "**/*": "prettier --write --ignore-unknown"
  }
}

node version v18.5.0 npm version 8.12.1

namastedating commented 2 years ago

I downgraded libraries like below.

    "@fortawesome/fontawesome-svg-core": "^6.1.1",
    "@fortawesome/free-brands-svg-icons": "^5.15.4",
    "@fortawesome/free-regular-svg-icons": "^5.15.4",
    "@fortawesome/free-solid-svg-icons": "^5.15.4",
    "@fortawesome/react-native-fontawesome": "^0.3.0",

And everything is fine now.

Looks like there is no support for version 6 on react native. Or may be any other issue.