I'm trying to override function from node module package that i use in my project but give me error of
TypeError: Cannot set property myFunc of #<Object> which has only a getter
the strange thing is i already did this override in old project year ago and there wasnt any error
example for how i do it: (import the function from the node module path(its exported from the node module) , and override it)
import {myFunc} from '../../utils';
myFunc = function () {
...
...
}
i tried search in google for this error but the results are for property override not functions