Repository: next.js
Issue: Type Error while trying to run dev server
Labels: bug,TypeScript

### Verify canary release

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

### Provide environment information

```bash
Operating System:
      Platform: darwin
      Arch: arm64
      Version: Darwin Kernel Version 22.5.0: Mon Apr 24 20:53:19 PDT 2023; root:xnu-8796.121.2~5/RELEASE_ARM64_T6020
    Binaries:
      Node: 16.20.0
      npm: 9.6.7
      Yarn: 4.0.0-rc.44
      pnpm: 7.29.1
    Relevant packages:
      next: 13.4.3
      eslint-config-next: 13.4.3
      react: 18.2.0
      react-dom: 18.2.0
      typescript: 5.0.4
```


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

TypeScript (plugin, built-in types)

### Link to the code that reproduces this issue or a replay of the bug

idk lol

### To Reproduce

1. Clone our website repository: `git clone https://github.com/mad-maids/website.git`
2. Install dependencies
3. Run dev server

### Describe the Bug

After migrating to v13 from v10, I tried to run dev server. However, it fails showing internal server error and if you try to build the project and run on production... it works!
```
- error TypeError: Cannot convert undefined or null to object
    at Function.keys (<anonymous>)
    at PrebuildWebpackPlugin.getChangedFile (/Users/sakhib/Developer/maid-website/node_modules/.pnpm/prebuild-webpack-plugin@1.1.1/node_modules/prebuild-webpack-plugin/index.js:60:32)
    at /Users/sakhib/Developer/maid-website/node_modules/.pnpm/prebuild-webpack-plugin@1.1.1/node_modules/prebuild-webpack-plugin/index.js:115:32
    at Hook.eval [as callAsync] (eval at create (/Users/sakhib/Developer/maid-website/node_modules/.pnpm/next@13.4.3_@babel+core@7.21.8_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/compiled/webpack/bundle5.js:13:28771), <anonymous>:8:17)
    at Hook.CALL_ASYNC_DELEGATE [as _callAsync] (/Users/sakhib/Developer/maid-website/node_modules/.pnpm/next@13.4.3_@babel+core@7.21.8_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/compiled/webpack/bundle5.js:13:25925)
    at run (/Users/sakhib/Developer/maid-website/node_modules/.pnpm/next@13.4.3_@babel+core@7.21.8_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/compiled/webpack/bundle5.js:28:483627)
    at /Users/sakhib/Developer/maid-website/node_modules/.pnpm/next@13.4.3_@babel+core@7.21.8_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/compiled/webpack/bundle5.js:28:483542
    at Compiler.readRecords (/Users/sakhib/Developer/maid-website/node_modules/.pnpm/next@13.4.3_@babel+core@7.21.8_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/compiled/webpack/bundle5.js:28:145202)
    at run (/Users/sakhib/Developer/maid-website/node_modules/.pnpm/next@13.4.3_@babel+core@7.21.8_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/compiled/webpack/bundle5.js:28:483475)
    at Watching._go (/Users/sakhib/Developer/maid-website/node_modules/.pnpm/next@13.4.3_@babel+core@7.21.8_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/compiled/webpack/bundle5.js:28:484611)
    at Watching._invalidate (/Users/sakhib/Developer/maid-website/node_modules/.pnpm/next@13.4.3_@babel+core@7.21.8_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/compiled/webpack/bundle5.js:28:486894)
    at Watching.invalidate (/Users/sakhib/Developer/maid-website/node_modules/.pnpm/next@13.4.3_@babel+core@7.21.8_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/compiled/webpack/bundle5.js:28:486688)
    at /Users/sakhib/Developer/maid-website/node_modules/.pnpm/next@13.4.3_@babel+core@7.21.8_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/compiled/webpack/bundle5.js:28:379594
    at processQueueWorker (/Users/sakhib/Developer/maid-website/node_modules/.pnpm/next@13.4.3_@babel+core@7.21.8_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/compiled/webpack/bundle5.js:28:379029)
    at MultiCompiler._runGraph (/Users/sakhib/Developer/maid-website/node_modules/.pnpm/next@13.4.3_@babel+core@7.21.8_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/compiled/webpack/bundle5.js:28:379272)
    at MultiCompiler.watch (/Users/sakhib/Developer/maid-website/node_modules/.pnpm/next@13.4.3_@babel+core@7.21.8_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/compiled/webpack/bundle5.js:28:379411)
    at watcher (/Users/sakhib/Developer/maid-website/node_modules/.pnpm/next@13.4.3_@babel+core@7.21.8_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/server/dev/hot-reloader.js:897:111)
    at new Promise (<anonymous>)
    at HotReloader.start (/Users/sakhib/Developer/maid-website/node_modules/.pnpm/next@13.4.3_@babel+core@7.21.8_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/server/dev/hot-reloader.js:895:30)
    at async DevServer.prepareImpl (/Users/sakhib/Developer/maid-website/node_modules/.pnpm/next@13.4.3_@babel+core@7.21.8_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/server/dev/next-dev-server.js:697:9)
    at async NextServer.prepare (/Users/sakhib/Developer/maid-website/node_modules/.pnpm/next@13.4.3_@babel+core@7.21.8_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/server/next.js:165:13)
    at async Server.<anonymous> (/Users/sakhib/Developer/maid-website/node_modules/.pnpm/next@13.4.3_@babel+core@7.21.8_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/server/lib/render-server.js:121:17)
TypeError: Cannot convert undefined or null to object
    at Function.keys (<anonymous>)
    at PrebuildWebpackPlugin.getChangedFile (/Users/sakhib/Developer/maid-website/node_modules/.pnpm/prebuild-webpack-plugin@1.1.1/node_modules/prebuild-webpack-plugin/index.js:60:32)
    at /Users/sakhib/Developer/maid-website/node_modules/.pnpm/prebuild-webpack-plugin@1.1.1/node_modules/prebuild-webpack-plugin/index.js:115:32
    at Hook.eval [as callAsync] (eval at create (/Users/sakhib/Developer/maid-website/node_modules/.pnpm/next@13.4.3_@babel+core@7.21.8_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/compiled/webpack/bundle5.js:13:28771), <anonymous>:8:17)
    at Hook.CALL_ASYNC_DELEGATE [as _callAsync] (/Users/sakhib/Developer/maid-website/node_modules/.pnpm/next@13.4.3_@babel+core@7.21.8_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/compiled/webpack/bundle5.js:13:25925)
    at run (/Users/sakhib/Developer/maid-website/node_modules/.pnpm/next@13.4.3_@babel+core@7.21.8_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/compiled/webpack/bundle5.js:28:483627)
    at /Users/sakhib/Developer/maid-website/node_modules/.pnpm/next@13.4.3_@babel+core@7.21.8_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/compiled/webpack/bundle5.js:28:483542
    at Compiler.readRecords (/Users/sakhib/Developer/maid-website/node_modules/.pnpm/next@13.4.3_@babel+core@7.21.8_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/compiled/webpack/bundle5.js:28:145202)
    at run (/Users/sakhib/Developer/maid-website/node_modules/.pnpm/next@13.4.3_@babel+core@7.21.8_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/compiled/webpack/bundle5.js:28:483475)
    at Watching._go (/Users/sakhib/Developer/maid-website/node_modules/.pnpm/next@13.4.3_@babel+core@7.21.8_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/compiled/webpack/bundle5.js:28:484611)
    at Watching._invalidate (/Users/sakhib/Developer/maid-website/node_modules/.pnpm/next@13.4.3_@babel+core@7.21.8_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/compiled/webpack/bundle5.js:28:486894)
    at Watching.invalidate (/Users/sakhib/Developer/maid-website/node_modules/.pnpm/next@13.4.3_@babel+core@7.21.8_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/compiled/webpack/bundle5.js:28:486688)
    at /Users/sakhib/Developer/maid-website/node_modules/.pnpm/next@13.4.3_@babel+core@7.21.8_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/compiled/webpack/bundle5.js:28:379594
    at processQueueWorker (/Users/sakhib/Developer/maid-website/node_modules/.pnpm/next@13.4.3_@babel+core@7.21.8_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/compiled/webpack/bundle5.js:28:379029)
    at MultiCompiler._runGraph (/Users/sakhib/Developer/maid-website/node_modules/.pnpm/next@13.4.3_@babel+core@7.21.8_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/compiled/webpack/bundle5.js:28:379272)
    at MultiCompiler.watch (/Users/sakhib/Developer/maid-website/node_modules/.pnpm/next@13.4.3_@babel+core@7.21.8_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/compiled/webpack/bundle5.js:28:379411)
    at watcher (/Users/sakhib/Developer/maid-website/node_modules/.pnpm/next@13.4.3_@babel+core@7.21.8_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/server/dev/hot-reloader.js:897:111)
    at new Promise (<anonymous>)
    at HotReloader.start (/Users/sakhib/Developer/maid-website/node_modules/.pnpm/next@13.4.3_@babel+core@7.21.8_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/server/dev/hot-reloader.js:895:30)
    at async DevServer.prepareImpl (/Users/sakhib/Developer/maid-website/node_modules/.pnpm/next@13.4.3_@babel+core@7.21.8_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/server/dev/next-dev-server.js:697:9)
    at async NextServer.prepare (/Users/sakhib/Developer/maid-website/node_modules/.pnpm/next@13.4.3_@babel+core@7.21.8_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/server/next.js:165:13)
    at async Server.<anonymous> (/Users/sakhib/Developer/maid-website/node_modules/.pnpm/next@13.4.3_@babel+core@- info automatically enabled Fast Refresh for 1 custom loader
7.21.8_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/server/lib/render-server.js:121:17)
```

### Expected Behavior

Just run the development server

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

Safari and Chromium

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

Vercel at https://maid.uz (deployed)