ant-design / ant-design-icons

⭐ Ant Design SVG Icons
https://ant.design/components/icon/
MIT License
960 stars 582 forks source link

warn dependency.assets is not allowed #535

Open vivkikkk opened 2 years ago

vivkikkk commented 2 years ago

warn Package @ant-design/icons-react-native contains invalid configuration: "dependency.assets" is not allowed. Please verify it's properly linked using "react-native config" command and contact the package maintainers about this.

Nice-zrd commented 1 year ago

I also encounter the same problem. "react-native": "0.69.6" does not allow links. How can I solve this problem?

hwjm commented 1 year ago

I also encounter the same problem. Do you have any solutions?

MDG-MMeksasi commented 1 year ago

any solution?

ashokkumawat708 commented 1 year ago

Any Solution

huzhanbo1996 commented 1 year ago

react-native link with dependency.assets has been removed after RN >= 0.69, so if anyone still wants to keep using new RN, u should use react-native-asset instead: guide

  1. yarn add react-native-asset
  2. config react-native.config.js like this
    module.exports = {
    assets: ["node_modules/@ant-design/icons-react-native/fonts"]
    };
  3. if using metro add this into app.json
    "packagerOpts": {
    "config": "metro.config.js"
    }
  4. yarn react-native-asset -> this will copy assets into platform specific path
  5. yarn android / yarn ios