Closed sateeshmunagala closed 2 months ago
I think the problem is with the utilsScript option - you're providing a relative path, but you must provide an absolute path here. Please see the readme for more info.
You may also want to check the other initialisation options you're using with the readme - several of them are incorrect, or no longer exist etc.
Fails on let i=document.createElement(a);return t&&Object.entries(t).forEach(([n,s])=>i.setAttribute(n,s)),e&&e.appendChild(i),i},b=a=>{let{instances:t}=r;Object.values(t).forEach(e=>e[a]())...
so yes, its about the options.
I've tried it without absolute path too, it throws an error on page load. In this case though, phoneInputField
could also not be defined in DOM when this piece of code is running.
Fixing the path on options should fix this, otherwise a minimal reproduceable example would be good outside of NopCommerce.
Thanks for the confirmation @ozgurozbek. I'll close this for now, but @sateeshmunagala do let us know if that doesn't fix the issue for you.
Plugin version
v24.4.0 e.g. v24.4.0 (please try latest version)
Steps to reproduce
Expected behaviour
Tell us what should happen No error should be there
Actual behaviour
Tell us what actually happens Got Below error Uncaught (in promise) TypeError: e[a] is not a function at intlTelInput.min.js:16:9979 at Array.forEach ()
at b (intlTelInput.min.js:16:9964)
at intlTelInput.min.js:16:30322
I tride to downgrade to lower version [v24.3.7] but got the same error again
Initialisation options
List any options you're using e.g. utilsScript or onlyCountries
Below are my init options
const phoneInput = window.intlTelInput(phoneInputField, { utilsScript: "~/Themes/NobleTheme/Content/js/utils.js", initialCountry: "in", autoHideDialCode: false, preferredCountries: ["in", "us", "ca", "au", "gb"], separateDialCode: true, nationalMode: true, formatOnDisplay: false, localizedCountries: { 'in': 'India' }, showSelectedDialCode: true });
Request you take a look at this issue