I tried installing and linking react-native sound into my project. However, when I run the following command in my project directory,
react-native link react-native-sound
the library doesn't link and I get the following result:
Scanning 758 folders for symlinks in /Users/MY_USER_NAME/PROJECT_NAME/node_modules
I think my node or npm setup is wrong.
The post `react-native link` without package name is Deprecated is regarding the deprecation of react-native link without the package name. If you are using a library with some native functionality then you need to make some changes in the Android and IOS files and that is called linking.
react-native link is an automatic way for installing native dependencies. It is an alternative to manually linking the dependency in your project. It works for both Android and iOS.
1- create new file in project root and name it react-native.config.js
2- add this code to react-native.config.js
:
module.exports = {
project: {
ios: {},
android: {},
},
assets: ['./src/assets/fonts/'],
};
3- change ['./src/assets/fonts/']
to your fonts path
4- now run react-native link
thats it
Ok after some digging, I found the issue. https://github.com/facebook/react-native/pull/14863
Maybe try applying that fix locally, it should work then.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With