<!--
  Note: if the issue is about documentation or the website, please file it at:
  https://github.com/reactjs/reactjs.org/issues/new
-->

**Do you want to request a *feature* or report a *bug*?**
Bug

**What is the current behavior?**
window.addEventListener is not a function in node_modules/schedule/cjs/schedule.development.js:366:10

**If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem. Your bug will get fixed much faster if we can run your code and it doesn't have dependencies other than React. Paste the link to your JSFiddle (https://jsfiddle.net/Luktwrdm/) or CodeSandbox (https://codesandbox.io/s/new) example below:**
- Build server.bundle.js for ssr (node) as usual
- Try to run it with "node server.bundle.js"
- See "window.addEventListener is not a function in node_modules/schedule/cjs/schedule.development.js:366:10"
- console.log(window) 1 line before 366 returns "{ navigator: {}, server: true }"

**What is the expected behavior?**
working as usual

**Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?**
"react": "^16.3.2"
Well, it worked just fine before I did yarn upgrade, first since March, I guess.
firstCallbackNode.expirationTime <= currentTime
          );
          continue;
        }
        break;
      }
    } else {
      
      if (firstCallbackNode !== null) {
        do {
          flushFirstCallback();
        } while (
          firstCallbackNode !== null &&
          getFrameDeadline() - getCurrentTime() > 0
        );
      }
    }
  } finally {
    isExecutingCallback = false;
    if (firstCallbackNode !== null) {
      
      ensureHostCallbackIsScheduled(firstCallbackNode);
    } else {
      isHostCallbackScheduled = false;
    }
    
    flushImmediateWork();
  }
}
function unstable_runWithPriority(priorityLevel, eventHandler) {