oblador/react-native-vector-icons

react-native-macos: Not supported (help wanted)

Open

#1624 aperta il 28 mag 2024

Vedi su GitHub
 (16 commenti) (1 reazione) (0 assegnatari)JavaScript (2162 fork)batch import
help wanted

Metriche repository

Star
 (17.109 star)
Metriche merge PR
 (Nessuna PR mergiata in 30 g)

Descrizione

  • "@react-native-vector-icons/common": "^0.0.1-alpha.6" (Using monorepo branch)
  • "@react-native-vector-icons/fontawesome": "^4.7.0-alpha.9",
  • npm --version: 10.5.0
  • node --version: v21.7.2

package.json:

{
  "name": "MyApp",
  "version": "0.0.1",
  "private": true,
  "scripts": {
    "lint": "eslint .",
    "macos": "react-native run-macos",
    "start": "react-native start",
    "test": "jest"
  },
  "dependencies": {
    "@react-native-vector-icons/common": "^0.0.1-alpha.6",
    "@react-native-vector-icons/fontawesome": "^4.7.0-alpha.9",
    "@react-native-vector-icons/fontawesome6": "^6.5.2-alpha.12",
    "@react-navigation/native": "^6.1.17",
    "@react-navigation/native-stack": "^6.9.26",
    "@react-navigation/stack": "^6.3.29",
    "@reduxjs/toolkit": "^2.2.5",
    "formik": "^2.4.6",
    "lodash": "^4.17.21",
    "react": "^18.2.0",
    "react-native": "^0.73.8",
    "react-native-macos": "^0.73.27",
    "react-native-menubar-extra": "^0.3.1",
    "react-native-safe-area-context": "^4.10.1",
    "react-native-screens": "^3.31.1",
    "react-native-select-dropdown": "^4.0.1",
    "react-redux": "^9.1.2"
  },
  "devDependencies": {
    "@babel/core": "^7.20.0",
    "@babel/preset-env": "^7.20.0",
    "@babel/runtime": "^7.20.0",
    "@react-native/babel-preset": "0.73.21",
    "@react-native/eslint-config": "0.73.2",
    "@react-native/metro-config": "0.73.5",
    "@react-native/typescript-config": "0.73.1",
    "@types/react": "^18.2.6",
    "@types/react-test-renderer": "^18.0.0",
    "babel-jest": "^29.6.3",
    "eslint": "^8.19.0",
    "jest": "^29.6.3",
    "metro-hermes-compiler": "^0.73.10",
    "prettier": "2.8.8",
    "react-test-renderer": "18.2.0",
    "typescript": "5.0.4"
  },
  "engines": {
    "node": ">=18"
  }
}

Description

Followed the install instructions, including a full re-install and rebuild of all node_modules and pod install from scratch, launched with a single page (see below), got this error:

Invariant Violation: TurboModuleRegistry.getEnforcing(...): 'VectorIcons' could not be found. Verify that a module by this name is registered in the native binary.Bridgeless mode: false. TurboModule interop: false. Modules loaded: {"NativeModules":["PlatformConstants","LogBox","Timing","AppState","SourceCode","BlobModule","WebSocketModule","RedBox","DevSettings","Networking","Appearance","DevLoadingView","UIManager","DeviceInfo"],"TurboModules":[],"NotFound":["NativePerformanceCxx","NativePerformanceObserverCxx","BugReporting","HeadlessJsTaskSupport","VectorIcons"]}

Reproducible Demo

App.js:

import { View } from 'react-native';
import AppConfigPanel from './src/app/components/app_config_panel';

function App(initialProps) {
    return <View><AppConfigPanel /></View>
};

src/app/components/app_config_panel.js:

import { View } from 'react-native';
import Icon from '@react-native-vector-icons/fontawesome';

export default function AppConfigPanel() {
    return <View />;
};

Guida contributor