Fixed node ReferenceError: window is not defined