To Use this Snippet add the following lines in your Package Json "libphonenumber-js": "^1.9.50", "antd-country-phone-input": "^4.5.0", Note: am using umi max so see how you can twik the code to fit your requirements