Repository: next.js
Issue: Embedded Sinity studio failed to start after deploy the application
Labels: bug

### Link to the code that reproduces this issue

https://github.com/rodolfostark/portfolio

### To Reproduce

1. Access https://portfolio/
2. Navegate to https://portfolio/studio

### Current vs. Expected behavior

After deploy the application the sanity studio can't be accessed throwing 500 Internal Server Error.

![image](https://github.com/vercel/next.js/assets/40967087/a5a145bc-235e-48b2-8f29-f2a1e8aee954)

But locally the studio just works fine when i navegate to http://localhost:3000/studio

![270118092-f57ad44a-f888-4b66-9a18-6d2815d5ec1b](https://github.com/vercel/next.js/assets/40967087/3d61114e-d45a-46e9-87b6-92c331a94bb2)


### Verify canary release

- [X] I verified that the issue exists in the latest Next.js canary release

### Provide environment information

```bash
Operating System:
      Platform: win32
      Arch: x64
      Version: Windows 10 Home Single Language
    Binaries:
      Node: 18.17.1
      npm: N/A
      Yarn: N/A
      pnpm: N/A
    Relevant Packages:
      next: 13.4.19
      eslint-config-next: 13.4.19
      react: 18.2.0
      react-dom: 18.2.0
      typescript: 5.2.2
    Next.js Config:
      output: N/A
```


### Which area(s) are affected? (Select all that apply)

Static HTML Export (output: "export")

### Additional context

Locally the access just works fine, but after deploying it and try to access the studio the application return this error

`Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './server.edge' is not defined by "exports" in /var/task/node_modules/react-dom/package.json
    at new NodeError (node:internal/errors:405:5)
    at exportsNotFound (node:internal/modules/esm/resolve:364:10)
    at packageExportsResolve (node:internal/modules/esm/resolve:700:9)
    at resolveExports (node:internal/modules/cjs/loader:567:36)
    at Module._findPath (node:internal/modules/cjs/loader:636:31)
    at Module._resolveFilename (node:internal/modules/cjs/loader:1063:27)
    at /var/task/node_modules/next/dist/server/require-hook.js:110:36
    at Module._load (node:internal/modules/cjs/loader:922:27)
    at e.<computed>._module.Module._load (/var/task/___vc/__launcher.js:15:1964)
    at Module.require (node:internal/modules/cjs/loader:1143:19) {
  code: 'ERR_PACKAGE_PATH_NOT_EXPORTED',
  page: '/studio'
}
Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './server.edge' is not defined by "exports" in /var/task/node_modules/react-dom/package.json
    at new NodeError (node:internal/errors:405:5)
    at exportsNotFound (node:internal/modules/esm/resolve:364:10)
    at packageExportsResolve (node:internal/modules/esm/resolve:700:9)
    at resolveExports (node:internal/modules/cjs/loader:567:36)
    at Module._findPath (node:internal/modules/cjs/loader:636:31)
    at Module._resolveFilename (node:internal/modules/cjs/loader:1063:27)
    at /var/task/node_modules/next/dist/server/require-hook.js:110:36
    at Module._load (node:internal/modules/cjs/loader:922:27)
    at e.<computed>._module.Module._load (/var/task/___vc/__launcher.js:15:1964)
    at Module.require (node:internal/modules/cjs/loader:1143:19) {
  code: 'ERR_PACKAGE_PATH_NOT_EXPORTED',
  page: '/studio'
}
RequestId: f726c18b-dc84-4e89-9ffb-aba6a467f0ad Error: Runtime exited with error: exit status 1
Runtime.ExitError`

my `package.json` and sanity configs are just as follows:

```
{
  "name": "portfolio",
  "version": "0.1.0",
  "private": true,
  "scripts": {
    "dev": "next dev",
    "build": "next build",
    "start": "next start",
    "lint": "next lint"
  },
  "dependencies": {
    "@types/node": "20.6.2",
    "@types/react": "18.2.21",
    "@types/react-dom": "18.2.7",
    "autoprefixer": "10.4.15",
    "eslint": "8.49.0",
    "eslint-config-next": "13.4.19",
    "next": "13.4.19",
    "next-sanity": "^5.5.3",
    "postcss": "8.4.29",
    "react": "18.2.0",
    "react-dom": "18.2.0",
    "react-icons": "^4.11.0",
    "sanity": "^3.16.7",
    "tailwindcss": "3.3.3",
    "typescript": "5.2.2"
  },
  "devDependencies": {
    "@portabletext/react": "^3.0.7"
  }
}
```