Hamed mayahian
Hamed mayahian

Reputation: 2323

React native custom font not loaded

I'm new to react-native ,

i read a tutorial to import custom font in my project.

my font not working.

here is my project structure:

enter image description here

here is my package.json:

{

  "name": "Arvandkala",
  "version": "0.1.0",
  "private": true,
  "devDependencies": {
    "react-native-scripts": "1.14.0",
    "jest-expo": "~27.0.0",
    "react-test-renderer": "16.3.1"
  },
  "main": "./node_modules/react-native-scripts/build/bin/crna-entry.js",
  "scripts": {
    "start": "react-native-scripts start",
    "eject": "react-native-scripts eject",
    "android": "react-native-scripts android",
    "ios": "react-native-scripts ios",
    "test": "jest"
  },
  "jest": {
    "preset": "jest-expo"
  },
  "dependencies": {
    "expo": "^27.0.1",
    "react": "16.3.1",
    "react-native": "~0.55.2"
  },
  "rnpm": {
    "assets": [
      "./assets/fonts"
    ]
  }
}

also when i run react-native link i see this message on terminal:

Scanning folders for symlinks in /Users/hamed/Desktop/arvandkala/Arvandkala/node_modules (12ms)
rnpm-install info Linking assets to ios project 
rnpm-install ERR! Something went wrong while linking. Error: Cannot read property 'pbxprojPath' of null 
Please file an issue here: https://github.com/facebook/react-native/issues 

Cannot read property 'pbxprojPath' of null

Upvotes: 0

Views: 461

Answers (1)

Sahesh
Sahesh

Reputation: 885

Run this command and try.

react-native upgrade

Upvotes: 1

Related Questions