I am struggling with this error since yesterday : Cannot read properties of undefined (reading 'get').
I am using ftp NodeJS module. I have instanciated an c attribute in my class like this :
constructor(){
this.fileFromFTP = '';
this.fileFromShop = '';
this.items = [];
this.c = new Client();
}
The error comes from this method, on the second line (this.c.get) :
refreshStore(){
this.c.on('ready', function() {
this.c.get('GCEvo/Product_mdl.csv', function(err, stream) {
if (err) throw err;
When I hover the this.c.get, I don't get a reference to my c attribute. How can I solve this ?
Thank you!