It seems that some servers will not re-init code environment properly after a branch change through the screeps script UI.
My guess is that the file-global scopes are re-ran, but previous results are still cached. This means that a call to Object.defineProperty is seen as a duplicate call, even though there is only one instance of this line and only one instance of a call to require() for the file.
Workaround is to re-upload all code, or make a whitespace change in the UI.
code snippet:
proto.creep.js
Object.defineProperty(Creep.prototype, "debug", { get: function () { return this.memory.debug; }, set: function (x) { this.memory.debug = x; } });
main.js
require('proto.creep');
example console error: