Chile Currency format issue for amount < 10K

Hi Team,

I am facing some weird issue while using money-works.

var moneyWorks = require(“money-works”);
const lessthan =new moneyWorks(8785, ‘CLP’);
console.log( “Chile Currency Format for amount less than 10K” , lessthan.toLocaleString(‘es-CL’));

The above mentioned code is working fine in runkit. But the same is not working in my tsx file.
Can anyone help me on this.It is very urgent.Struggling for more than 2 weeks.
Note : Issue is only for Spanish(Chile) and amount <10K.
Please find the screen as below.