Repository: storybook
Issue: [Bug]: No matching export in "node_modules/@testing-library/dom/dist/@testing-library/dom.esm.js" for import "default"
Labels: bug,dependencies,compatibility with other tools,test-runner

### Describe the bug

Storybook v7.4.1 starts but then throws the following build error, No matching export in "node_modules/@testing-library/dom/dist/@testing-library/dom.esm.js" for import "default"

### To Reproduce

Windows 11
NodeJS v18.12.1 

Setup a fresh ViteJS React TS environment, setup Storybook with the following commands
`npx sb init --builder @storybook/builder-vite`
`npm run storybook`

package.json below:

`{
  "name": "vite-project",
  "private": true,
  "version": "0.0.0",
  "type": "module",
  "scripts": {
    "dev": "vite",
    "build": "tsc && vite build",
    "lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
    "preview": "vite preview",
    "storybook": "storybook dev -p 6006",
    "build-storybook": "storybook build"
  },
  "dependencies": {
    "react": "^18.2.0",
    "react-dom": "^18.2.0",
    "sass": "^1.67.0"
  },
  "devDependencies": {
    "@storybook/addon-essentials": "^7.4.1",
    "@storybook/addon-interactions": "^7.4.1",
    "@storybook/addon-links": "^7.4.1",
    "@storybook/addon-onboarding": "^1.0.8",
    "@storybook/blocks": "^7.4.1",
    "@storybook/react": "^7.4.1",
    "@storybook/react-vite": "^7.4.1",
    "@storybook/testing-library": "^0.2.0",
    "@types/react": "^18.2.15",
    "@types/react-dom": "^18.2.7",
    "@typescript-eslint/eslint-plugin": "^6.0.0",
    "@typescript-eslint/parser": "^6.0.0",
    "@vitejs/plugin-react": "^4.0.3",
    "eslint": "^8.45.0",
    "eslint-plugin-react-hooks": "^4.6.0",
    "eslint-plugin-react-refresh": "^0.4.3",
    "eslint-plugin-storybook": "^0.6.13",
    "storybook": "^7.4.1",
    "typescript": "^5.0.2",
    "vite": "^4.4.5"
  }
}
`

### System

```bash
Running Storybook

> vite-project@0.0.0 storybook
> storybook dev -p 6006 --initial-path=/onboarding --quiet

@storybook/cli v7.4.1

info => Starting manager..
X [ERROR] No matching export in "node_modules/@testing-library/dom/dist/@testing-library/dom.esm.js" for import "default"

    node_modules/@testing-library/user-event/dist/esm/_interop/dtl.js:2:7:
      2 │ import def__default from '@testing-library/dom';
        ╵        ~~~~~~~~~~~~

C:\Development\Learning\react-ts-form-components\node_modules\@storybook\cli\bin\index.js:23
  throw error;
  ^

Error: Build failed with 1 error:
node_modules/@testing-library/user-event/dist/esm/_interop/dtl.js:2:7: ERROR: No matching export in "node_modules/@testing-library/dom/dist/@testing-library/dom.esm.js" for import "default"
    at failureErrorWithLog (C:\Development\Learning\react-ts-form-components\node_modules\esbuild\lib\main.js:1649:15)
    at C:\Development\Learning\react-ts-form-components\node_modules\esbuild\lib\main.js:1058:25
    at C:\Development\Learning\react-ts-form-components\node_modules\esbuild\lib\main.js:1525:9
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
  errors: [
    {
      detail: undefined,
      id: '',
      location: {
        column: 7,
        file: 'node_modules/@testing-library/user-event/dist/esm/_interop/dtl.js',
        length: 12,
        line: 2,
        lineText: "import def__default from '@testing-library/dom';",
        namespace: '',
        suggestion: ''
      },
      notes: [],
      pluginName: '',
      text: 'No matching export in "node_modules/@testing-library/dom/dist/@testing-library/dom.esm.js" for import "default"'
    }
  ],
  warnings: []
}

Node.js v18.12.1
```


### Additional context

_No response_