new Intl.NumberFormat(i,{style:"currency",currency:"EUR"}).formatToParts is not a function. code example
Example: Intl.NumberFormat
console.log(new Intl.NumberFormat('de-DE', { style: 'currency', currency: 'EUR' }).format(number));
console.log(new Intl.NumberFormat('de-DE', { style: 'currency', currency: 'EUR' }).format(number));