Reputation: 917
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.
Upvotes: 8
Views: 37215
Reputation: 71
With latest version of react-native-cli, you can just do:
npx react-native-asset
Upvotes: 4
Reputation: 109
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
Upvotes: 8
Reputation: 2625
I had the same issue in linking a npm package, I closed the react native android project in android studio (where I was linking the npm repo), It worked fine for me.
Upvotes: 0
Reputation: 1384
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.
Upvotes: 5