Repository: next.js
Issue: in Next.js latest (v13.1.6), cannot find webpack module when running custom express server.
Labels: bug

### Verify canary release

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

### Provide environment information

Operating System:
      Platform: darwin
      Arch: arm64
      Version: Darwin Kernel Version 21.4.0: Mon Feb 21 20:35:58 PST 2022; root:xnu-8020.101.4~2/RELEASE_ARM64_T6000
    Binaries:
      Node: 16.14.2
      npm: 8.5.0
      Yarn: 1.22.15
      pnpm: 6.11.0
    Relevant packages:
      next: 13.1.6
      eslint-config-next: 13.1.6
      react: 18.2.0
      react-dom: 18.2.0

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

CLI (create-next-app)

### Link to the code that reproduces this issue

N/A

### To Reproduce

`npx create-next-app@latest`

i created simple express custom server for nextjs. (and add express)

`yarn add express`

```javascript
// server.js

const express = require('express')
const next = require('next')
const nextConfig = require('./next.config')

const dev = process.env.NODE_ENV !== 'production'
const app = next({ dev, conf: nextConfig })
const handle = app.getRequestHandler()

app.prepare()
    .then(() => {
        const server = express()

        server.get('*', (req, res) => {
            return handle(req, res)
        })

        server.listen(3000, (err) => {
            if (err) throw err
            console.log('> Ready on http://localhost:3000')
        })
    })
    .catch((ex) => {
        console.error(ex.stack)
        process.exit(1)
    })

```

And i run `node server.js`


### Describe the Bug

next app prepare was failed with error.

```
Error: Cannot find module 'webpack'
Require stack:
- /Users/song/Desktop/project/temp/my-custom-server/node_modules/next/dist/compiled/@next/react-refresh-utils/dist/ReactRefreshWebpackPlugin.js
- /Users/song/Desktop/project/temp/my-custom-server/node_modules/next/dist/build/webpack-config.js
- /Users/song/Desktop/project/temp/my-custom-server/node_modules/next/dist/server/dev/hot-reloader.js
- /Users/song/Desktop/project/temp/my-custom-server/node_modules/next/dist/server/dev/next-dev-server.js
- /Users/song/Desktop/project/temp/my-custom-server/node_modules/next/dist/server/next.js
- /Users/song/Desktop/project/temp/my-custom-server/server.js
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
    at Function.mod._resolveFilename (/Users/song/Desktop/project/temp/my-custom-server/node_modules/next/dist/build/webpack/require-hook.js:23:32)
    at Function.Module._load (node:internal/modules/cjs/loader:778:27)
    at Module.require (node:internal/modules/cjs/loader:1005:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at new ReactFreshWebpackPlugin (/Users/song/Desktop/project/temp/my-custom-server/node_modules/next/dist/compiled/@next/react-refresh-utils/dist/ReactRefreshWebpackPlugin.js:109:72)
    at Object.getBaseWebpackConfig [as default] (/Users/song/Desktop/project/temp/my-custom-server/node_modules/next/dist/build/webpack-config.js:1045:32)
    at async Promise.all (index 0)
    at async Span.traceAsyncFn (/Users/song/Desktop/project/temp/my-custom-server/node_modules/next/dist/trace/trace.js:79:20)
    at async Span.traceAsyncFn (/Users/song/Desktop/project/temp/my-custom-server/node_modules/next/dist/trace/trace.js:79:20)
    at async HotReloader.start (/Users/song/Desktop/project/temp/my-custom-server/node_modules/next/dist/server/dev/hot-reloader.js:337:30)
    at async DevServer.prepare (/Users/song/Desktop/project/temp/my-custom-server/node_modules/next/dist/server/dev/next-dev-server.js:528:9)

```


### Expected Behavior

I think lastest version of nextjs has webpack dependency issue.

I downgraded the version to 13.0.6 and tried again, and it was executed.

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

_No response_

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

_No response_