Unrecognized command "link" when linking fonts in react native

Viewed 13372

Trying to link custom fonts in a react native project, when using npx react-native link I get an error saying Unrecognized command "link"

Is there a way to resolve this?

2 Answers

Due to autolinking, link and unlink commands have been removed in React Native 0.69.

So, please try this:

npx react-native-asset

manual linking has been removed from react-native 0.69 in favour of autolinking feature so now you have link your assets in native module or else you can use react-native-asset

remaining steps are same as before crate a file in root directory of project

react-native.config.js

module.exports = {
    project: {
        ios: {},
        android: {}
    },
    assets: ['./src/assets/'],
};

after installing react-native-asset run below command

yarn react-native-asset or npx react-native-asset
Related