Repository: next.js
Issue: SSG is not working when runtime is experimental-edge
Labels: Runtime

### Verify canary release

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

### Provide environment information

```bash
Operating System:
      Platform: linux
      Arch: x64
      Version: #22 SMP Tue Jan 10 18:39:00 UTC 2023
    Binaries:
      Node: 16.17.0
      npm: 8.15.0
      Yarn: 1.22.19
      pnpm: 7.1.0
    Relevant packages:
      next: 13.3.1-canary.2
      eslint-config-next: N/A
      react: 18.2.0
      react-dom: 18.2.0
```


### Which area(s) of Next.js are affected? (leave empty if unsure)

App directory (appDir: true)

### Link to the code that reproduces this issue

https://codesandbox.io/p/sandbox/agitated-clarke-w1vxie?file=%2Fapp%2Fhello%2F%5Bslug%5D%2Fpage.tsx&selection=%5B%7B%22endColumn%22%3A47%2C%22endLineNumber%22%3A3%2C%22startColumn%22%3A47%2C%22startLineNumber%22%3A3%7D%5D

### To Reproduce

- Execute the `build` command. And you should see `ℇ /hello/[slug] `

### Describe the Bug

When I set the runtime to `experimental-edge`, the SSG is no longer working, my page is marked as `Streaming` (server-side renders with streaming). With the default runtime, it works correctly.

BTW I don't know if it's related, but when I deploy my code on Vercel with `experimental-edge` I have these errors:
<details>
<summary>TypeError: Cannot read properties of undefined (reading 'id')</summary>

```
TypeError: Cannot read properties of undefined (reading 'id')
    at (node_modules/.pnpm/next@13.3.0_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/esm/server/app-render/app-render.js:175:0)
    at (node_modules/.pnpm/next@13.3.0_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/esm/server/app-render/app-render.js:225:0)
    at (node_modules/.pnpm/next@13.3.0_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/esm/server/app-render/app-render.js:246:0)
    at (node_modules/.pnpm/next@13.3.0_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/esm/server/app-render/app-render.js:245:0)
    at (node_modules/.pnpm/next@13.3.0_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/esm/server/app-render/app-render.js:748:0)
    at (node_modules/.pnpm/next@13.3.0_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/esm/server/web-server.js:296:0)
    at (node_modules/.pnpm/next@13.3.0_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/esm/server/base-server.js:943:0)
    at (node_modules/.pnpm/next@13.3.0_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/esm/server/base-server.js:1066:0)
    at (node_modules/.pnpm/next@13.3.0_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/esm/server/response-cache/web.js:46:0)
```
</details>
<details>
<summary>Cannot read properties of null (reading 'default')</summary>

```
TypeError: Cannot read properties of null (reading 'default')
    at (node_modules/.pnpm/next@13.3.0_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/esm/build/webpack/loaders/next-edge-ssr-loader/render.js:65:0)
    at (node_modules/.pnpm/next@13.3.0_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/esm/server/web-server.js:343:0)
    at (node_modules/.pnpm/next@13.3.0_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/esm/server/base-server.js:1401:0)
    at (node_modules/.pnpm/next@13.3.0_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/esm/server/base-server.js:1296:0)
    at (node_modules/.pnpm/next@13.3.0_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/esm/server/base-server.js:555:0)
    at (node_modules/.pnpm/next@13.3.0_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/esm/server/web-server.js:254:0)
    at (node_modules/.pnpm/next@13.3.0_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/esm/server/router.js:293:0)
    at (node_modules/.pnpm/next@13.3.0_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/esm/server/base-server.js:529:0)
```
</details>

I don't have them when I use the default runtime.

### Expected Behavior

When I set the runtime to `experimental-edge`, the SSG should work. If I run the `build` command, I should see `● /hello/[slug]`

### Which browser are you using? (if relevant)

_No response_

### How are you deploying your application? (if relevant)

Vercel