Repository: next.js
Issue: pageExtensions breaking the app router
Labels: bug

### Verify canary release

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

### Provide environment information

```bash
{
  name: 'test',
  description: "Node.js 18's node:test, as an npm package",
  'dist-tags': {
    latest: '3.3.0'
  },
  versions: [
    '0.0.2',
    '0.0.3',
    '0.0.4',
    '0.0.5',
    '0.0.6',
    '0.0.7',
    '0.0.8',
    '0.0.9',
    '0.0.10',
    '0.0.11',
    '0.1.0',
    '0.1.1',
    '0.2.0',
    '0.2.1',
    '0.3.0',
    '0.4.0',
    '0.4.1',
    '0.4.2',
    '0.4.3',
    '0.4.4',
    '0.5.1',
    '0.5.2',
    '0.6.0',
    '3.0.0',
    '3.0.1',
    '3.1.0',
    '3.2.0',
    '3.2.1',
    '3.3.0'
  ],
  maintainers: [
    {
      name: 'nodejs-foundation',
      email: 'build@iojs.org'
    }
  ],
  repository: {
    type: 'git',
    url: 'git+https://github.com/nodejs/node-core-test.git'
  },
  time: {
    modified: '2023-04-16T00:59:42.780Z',
    created: '2011-02-16T22:31:02.088Z',
    '0.0.2': '2011-02-16T22:31:02.088Z',
    '0.0.3': '2011-02-16T22:31:02.088Z',
    '0.0.4': '2011-02-16T22:31:02.088Z',
    '0.0.5': '2011-02-16T22:31:02.088Z',
    '0.0.6': '2011-02-16T22:31:02.088Z',
    '0.0.7': '2011-02-16T22:31:02.088Z',
    '0.0.8': '2011-02-16T22:31:02.088Z',
    '0.0.9': '2011-02-16T22:31:02.088Z',
    '0.0.10': '2011-02-16T22:31:02.088Z',
    '0.0.11': '2011-02-16T22:31:02.088Z',
    '0.1.0': '2011-02-24T13:39:28.664Z',
    '0.1.1': '2011-04-02T01:10:09.545Z',
    '0.2.0': '2011-06-07T12:39:12.436Z',
    '0.2.1': '2011-06-09T23:57:53.383Z',
    '0.3.0': '2011-07-10T12:28:33.904Z',
    '0.4.0': '2011-07-10T14:55:35.087Z',
    '0.4.1': '2011-07-17T22:30:22.185Z',
    '0.4.2': '2011-11-14T23:01:53.471Z',
    '0.4.3': '2011-11-14T23:06:18.478Z',
    '0.4.4': '2012-01-20T09:51:42.755Z',
    '0.5.0': '2012-11-01T01:58:31.420Z',
    '0.5.1': '2012-11-01T05:27:52.320Z',
    '0.5.2': '2012-11-01T07:05:34.818Z',
    '0.6.0': '2012-11-24T09:13:06.534Z',
    '3.0.0': '2022-06-02T13:50:28.862Z',
    '3.0.1': '2022-06-15T08:43:33.797Z',
    '3.1.0': '2022-07-20T18:25:10.819Z',
    '3.2.0': '2022-08-01T08:45:27.997Z',
    '3.2.1': '2022-08-03T11:26:29.684Z',
    '3.3.0': '2023-02-08T11:14:06.655Z'
  },
  users: {
    fgribreau: true,
    crazyjingling: true,
    tobiasnickel: true,
    nickeltobias: true,
    brs999: true,
    krytius: true,
    lovasoa: true,
    alexxnica: true,
    bbohen: true,
    cptechadmin: true,
    'mf-pherlihy': true,
    yavarguliyev: true,
    tecnomatrix: true,
    mthompson001: true,
    xear: true,
    sneaked: true
  },
  homepage: 'https://github.com/nodejs/node-core-test#readme',
  bugs: {
    url: 'https://github.com/nodejs/node-core-test/issues'
  },
  readmeFilename: 'README.md',
  license: 'MIT',
  version: '3.3.0',
  main: './lib/test.js',
  types: './lib/test.d.ts',
  bin: {
    'node--test': 'bin/node--test.js',
    'node--test-only': 'bin/node--test-only.js',
    'node--test-name-pattern': 'bin/node--test-name-pattern.js',
    test: 'bin/node-core-test.js'
  },
  imports: {
    '#internal/*': './lib/internal/*.js',
    '#timers/*': './lib/timers/*.js',
    '#node:test': './lib/test.js'
  },
  scripts: {
    test: 'npm run test:lint && npm run test:unit',
    'test:lint': 'standard',
    'test:lint:fix': 'standard --fix',
    'test:unit': 'node test/parallel.mjs && node test/message.js && node test/node-core-test.js'
  },
  devDependencies: {
    standard: '^17.0.0'
  },
  dependencies: {
    minimist: '^1.2.6',
    'readable-stream': '^4.3.0',
    'string.prototype.replaceall': '^1.0.6'
  },
  gitHead: '414743a74ef26ba383ae6c4d87e5b806bf7dc831',
  dist: {
    integrity: 'sha512-JKlEohxDIJRjwBH/+BrTcAPHljBALrAHw3Zs99RqZlaC605f6BggqXhxkdqZThbSHgaYPwpNJlf9bTSWkb/1rA==',
    shasum: 'a2b56c6aa386c5732065793e8d9d92074a9cdd41',
    tarball: 'https://registry.npmjs.org/test/-/test-3.3.0.tgz',
    fileCount: 115,
    unpackedSize: 443334,
    signatures: [
      {
        keyid: 'SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA',
        sig: 'MEYCIQCaf8Z1yDUlMikQh1RouG51OXMazNEX37VqLkVDoP7ChQIhAK19hRazs6GgWzyNVoaprpHD47L1tgZegJjSYJRG4Ued'
      }
    ],
    'npm-signature': '-----BEGIN PGP SIGNATURE-----\r\n' +
      'Version: OpenPGP.js v4.10.10\r\n' +
      'Comment: https://openpgpjs.org\r\n' +
      '\r\n' +
      'wsFzBAEBCAAGBQJj44P+ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\n' +
      'EgJ2VmoRvQ/+PXMHsV6QmbMAYjfLzXNnorD1zUoJa4cLc4iVaQOGQZPjuC7/\r\n' +
      'BVGYIBfWcAGGA9aFeuYym+9CqSqJBCO8MwAk/eb+SKhHEIhQMJrXhto0oDEz\r\n' +
      'HLkIlW0HU6acq4qlnRJ0wRZ029L+Yw1ozlPGt33knrg45tGza4RNbtRidbYz\r\n' +
      'rnpS99eHgfyE9lWCMlufYLUA1Nhxfc1p99zdMwxXstfD5MJD6FGzI00hF8Ln\r\n' +
      'IyXd7d453hB0KY11BqhDdUdpS/g1n3m2YXoaLz6xksSTex+v7mjrU+QY1uZG\r\n' +
      'ewvje3OSKUtrl5Y3L1F9enCgItriAtaFzmjasJe2UPBzm93Db5lnEkMk8nXN\r\n' +
      '2RMd/XL+ZZdNuJ9BFu2KMWyOBkr6i/YyY1/7Fj5KPv+HL5bSakOpU8dht2jK\r\n' +
      'BkasiRNItddzbfsDCa0x1tfXLpCwThiIJP/Hl5n5qmclEDf/igAb1Z6ylhlI\r\n' +
      'NQSsMeSXwoDPD1JN1HScPak4hbEHuVf4D5Rr6YmkfwdxQ9QQGWNvwVAGbmjF\r\n' +
      'uz725UHMjQi8qmJ3ZxDjHJHYt023TxQ0Coasx6Axlbo7pV6hN9rVGWMDxRAp\r\n' +
      'wVSgwit8QCr1EssX4KObO68OGhPQao9ix3MxOJPf7LkXUiDq1Cb/86XflcCC\r\n' +
      'agMTQalLeaLrWiflW/iHYPmQppcEJFwdWIA=\r\n' +
      '=wxmL\r\n' +
      '-----END PGP SIGNATURE-----\r\n'
  },
  directories: {}
}
```


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

App Router

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

https://github.com/quantafire/next-repro

### To Reproduce

Run `create-next-app` with these config options:
`✔ What is your project named? … test
✔ Would you like to use TypeScript? … No / Yes
✔ Would you like to use ESLint? … No / Yes
✔ Would you like to use Tailwind CSS? … No / Yes
✔ Would you like to use `src/` directory? … No / Yes
✔ Would you like to use App Router? (recommended) … No / Yes
✔ Would you like to customize the default import alias? … No / Yes
✔ What import alias would you like configured? … @/*`

Add `pageExtensions: ['page.tsx', 'page.ts', 'page.jsx', 'page.js'],` to `next.config.js`

Rename `src/app/page.tsx` to `src/app/page.page.tsx` (the page won't work without the rename)

Run `npm run dev`

### Describe the Bug

- None of the CSS loads.
- Error appears in console `navigation.js:136 Uncaught Error: invariant expected app router to be mounted`

### Expected Behavior

Ideally pageExtensions shouldn't work on the app router due to the new naming conventions.

The invariant error should not appear.

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

Arc

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

n/a