'Roll up: typescript error (!) `this` has been rewritten to `undefined`

I am having issues with rollup

this has been rewritten to undefined

during rollup. Please someone should help me out on this.

I found a hint online "you can use options.context and options.moduleContext to change this behaviour. I also don't know how to implement this.

Please enlighten me in anyway you can.

After running the below command

"build": "rollup -c",
"build-watch": "rollup -c -w",

it was suppose to pick up, watch and run files successfully.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source