title: Error: Cannot find module 'react-dom/server.browser'
body: <p>I have these dependencies in package.json:</p>
  <pre class="lang-json prettyprint-override"><code>  &quot;dependencies&quot;: {
      ...
      &quot;@builder.io/partytown&quot;: &quot;^0.5.4&quot;,
      &quot;@mantine/core&quot;: &quot;^4.2.5&quot;,
      &quot;@mantine/dates&quot;: &quot;^4.2.5&quot;,
      &quot;@mantine/dropzone&quot;: &quot;^4.2.5&quot;,
      &quot;@mantine/form&quot;: &quot;^4.2.5&quot;,
      &quot;@mantine/hooks&quot;: &quot;^4.2.5&quot;,
      &quot;@mantine/modals&quot;: &quot;^4.2.5&quot;,
      &quot;@mantine/next&quot;: &quot;^4.2.5&quot;,
      &quot;@mantine/notifications&quot;: &quot;^4.2.5&quot;,
      &quot;@mantine/prism&quot;: &quot;^4.2.5&quot;,
      &quot;@mantine/rte&quot;: &quot;^4.2.5&quot;,
      &quot;@mantine/spotlight&quot;: &quot;^4.2.5&quot;,
      &quot;dayjs&quot;: &quot;^1.11.2&quot;,
      &quot;next&quot;: &quot;12.1.6&quot;,
      &quot;next-seo&quot;: &quot;^5.4.0&quot;,
      &quot;react&quot;: &quot;18.1.0&quot;,
      &quot;react-dom&quot;: &quot;18.1.0&quot;,
      &quot;react-icons&quot;: &quot;^4.3.1&quot;,
      &quot;react-query&quot;: &quot;^3.39.0&quot;,
      &quot;zod&quot;: &quot;^3.16.0&quot;,
      ...
    },
  </code></pre>
  <p>And when install them with <code>pnpm install</code> using <code>pnpm@v7.1.0</code>, it throws error:</p>
  <pre class="lang-bash prettyprint-override"><code>$ pnpm install
  Scope: all 2 workspace projects
  apps/web                                 |  WARN  deprecated source-map-resolve@0.6.0
  Packages: +792
  ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  Packages are cloned from the content-addressable store to the virtual store.
    Content-addressable store is at: /home/mymachine/.local/share/pnpm/store/v3
    Virtual store is at:             node_modules/.pnpm
  Progress: resolved 814, reused 791, downloaded 0, added 792, done
  . prepare$ husky install
  │ husky - Git hooks installed
  └─ Done in 179ms
  apps/web postinstall$ pnpx next telemetry disable
  │ ../..                                    | Progress: resolved 1, reused 0, downloaded 0, added 0
  │ ../..                                    | Progress: resolved 20, reused 9, downloaded 0, added 0
  │ ../..                                    |  +10 -783 +--------------------------
  │  WARN  Issues with peer dependencies found
  │ ../../.local/share/pnpm/store/v3/tmp/dlx-32135
  │ └─┬ next
  │   ├── ✕ missing peer react@&quot;^17.0.2 || ^18.0.0-0&quot;
  │   ├── ✕ missing peer react-dom@&quot;^17.0.2 || ^18.0.0-0&quot;
  │   └─┬ styled-jsx
  │     └── ✕ missing peer react@&quot;&gt;= 16.8.0 || 17.x.x || ^18.0.0-0&quot;
  │ Peer dependencies that should be installed:
  │   react-dom@&quot;^17.0.2 || ^18.0.0-0&quot;
  │   react@&quot;&gt;=17.0.2 &lt;18.0.0 || &gt;=18.0.0-0 &lt;19.0.0&quot;
  │ ../..                                    | Progress: resolved 20, reused 10, downloaded 0, added 2, do
  │ The module 'react' was not found. Next.js requires that you include it in 'dependencies' of your 'pack
  │ The module 'react-dom' was not found. Next.js requires that you include it in 'dependencies' of your '
  │ node:internal/modules/cjs/loader:942
  │   throw err;
  │   ^
  │ Error: Cannot find module 'react-dom/server.browser'
  │ Require stack:
  │ - /home/mymachine/myfolder/myproject/node_modules/.pnpm/next@12.1.6/node_modules/next/dist/bin/next
  │     at Module._resolveFilename (node:internal/modules/cjs/loader:939:15)
  │     at Module._load (node:internal/modules/cjs/loader:780:27)
  │     at Module.require (node:internal/modules/cjs/loader:1005:19)
  │     at require (node:internal/modules/cjs/helpers:102:18)
  │     at Object.&lt;anonymous&gt; (/home/mymachine/myfolder/myproject/node_modules/.pnpm/next@12.1.6/node_modules/next/d
  │     at Module._compile (node:internal/modules/cjs/loader:1105:14)
  │     at Module._extensions..js (node:internal/modules/cjs/loader:1159:10)
  │     at Module.load (node:internal/modules/cjs/loader:981:32)
  │     at Module._load (node:internal/modules/cjs/loader:827:12)
  │     at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:77:12) {
  │   code: 'MODULE_NOT_FOUND',
  │   requireStack: [
  │     '/home/mymachine/myfolder/myproject/node_modules/.pnpm/next@12.1.6/node_modules/next/dist/bin/next'
  │   ]
  │ }
  │ Node.js v18.1.0
  │  ERROR  Command failed with exit code 1: /home/mymachine/.local/share/pnpm/store/v3/tmp/dlx-32135/node_modul
  └─ Failed in 3.3s
   ELIFECYCLE  Command failed with exit code 1.
  </code></pre>
  <p>I tried creating a new next-typescript template project and it installed fine.</p>
  <pre class="lang-bash prettyprint-override"><code>$ pnpm install
  Lockfile is up-to-date, resolution step is skipped
  Packages: +228
  ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  Packages are cloned from the content-addressable store to the virtual store.
    Content-addressable store is at: /home/mymachine/.local/share/pnpm/store/v3
    Virtual store is at:             node_modules/.pnpm
  Progress: resolved 228, reused 228, downloaded 0, added 228, done
  
  dependencies:
  + next 12.1.6
  + react 18.1.0
  + react-dom 18.1.0
  
  devDependencies:
  + @types/node 17.0.33
  + @types/react 18.0.9
  + @types/react-dom 18.0.4
  + eslint 8.15.0
  + eslint-config-next 12.1.6
  + typescript 4.6.4
  </code></pre>
  <p>What am I doing wrong?</p>