PR #17599 broke `yarn test-build-devtools`. (b6c423daadaa35da3f34048628df9635505eecb1 is not broken,  0cf22a56a18790ef34c71bef14f64695c0498619 is broken)
```
    Configuration error:
    
    Could not locate module shared/consoleWithStackDev mapped as:
    /Users/bvaughn/Documents/git/react/build/node_modules/shared/consoleWithStackDev.
    
    Please check your configuration for these entries:
    {
      "moduleNameMapper": {
        "/^shared\/([^\/]+)$/": "/Users/bvaughn/Documents/git/react/build/node_modules/shared/$1"
      },
      "resolver": null
    }
```
let targetRenderCount = 0;
    const errorSpy = ((console: any).error = jest.fn());
    const infoSpy = ((console: any).info = jest.fn());
    const logSpy = ((console: any).log = jest.fn());
    const warnSpy = ((console: any).warn = jest.fn());
    const Target = React.memo(props => {
      targetRenderCount++;
      console.error('error');
      console.info('info');
      console.log('log');
      console.warn('warn');
      React.useState(0);
      return null;
    });
    const container = document.createElement('div');
    await utils.actAsync(() =>
      ReactDOM.render(<Target a={1} b="abc" />, container),
    );
    expect(targetRenderCount).toBe(1);
    expect(errorSpy).toHaveBeenCalledTimes(1);
    expect(errorSpy).toHaveBeenCalledWith('error');
    expect(infoSpy).toHaveBeenCalledTimes(1);
    expect(infoSpy).toHaveBeenCalledWith('info');
    expect(logSpy).toHaveBeenCalledTimes(1);
    expect(logSpy).toHaveBeenCalledWith('log');
    expect(warnSpy).toHaveBeenCalledTimes(1);
    expect(warnSpy).toHaveBeenCalledWith('warn');
    const id = ((store.getElementIDAtIndex(0): any): number);
    let inspectedElement = null;
    function Suspender({target}) {