Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

/404 compiled as pages route #53059

Open
1 task done
masterkain opened this issue Jul 22, 2023 · 3 comments
Open
1 task done

/404 compiled as pages route #53059

masterkain opened this issue Jul 22, 2023 · 3 comments
Labels
bug Issue was opened via the bug report template.

Comments

@masterkain
Copy link

masterkain commented Jul 22, 2023

Verify canary release

  • I verified that the issue exists in the latest Next.js canary release

Provide environment information

Operating System:
      Platform: linux
      Arch: x64
      Version: #1 SMP Thu May 25 07:17:40 UTC 2023
    Binaries:
      Node: 20.4.0
      npm: 9.7.2
      Yarn: 3.6.1
      pnpm: N/A
    Relevant Packages:
      next: 13.4.12
      eslint-config-next: 13.4.12
      react: 18.2.0
      react-dom: 18.2.0
      typescript: 5.1.6
    Next.js Config:
      output: standalone

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/icoretech/airbroke

To Reproduce

clone the repo, attempt a build but there should be no need

Describe the Bug

at first I wrote this next.js 13 appDir without a custom not-found.tsx, leaving the default.
in the build logs we can observe this:

#15 27.41 Route (app)                                Size     First Load JS
#15 27.41 ┌ ○ /                                      486 B          92.2 kB
#15 27.41 ├ λ /api/auth/[...nextauth]                0 B                0 B
#15 27.41 ├ λ /api/completion                        0 B                0 B
#15 27.41 ├ λ /api/hc                                0 B                0 B
#15 27.41 ├ λ /api/v3/notices                        0 B                0 B
#15 27.41 ├ λ /bookmarks                             3.5 kB          122 kB
#15 27.41 ├ ○ /icon.svg                              0 B                0 B
#15 27.41 ├ λ /notices/[notice_id]                   7.78 kB         127 kB
#15 27.41 ├ λ /occurrences/[occurrence_id]           13.1 kB         207 kB
#15 27.41 ├ λ /projects                              2.15 kB         121 kB
#15 27.41 ├ λ /projects/[project_id]                 9.34 kB         128 kB
#15 27.41 ├ λ /projects/[project_id]/edit            22.9 kB         216 kB
#15 27.41 ├ λ /projects/new                          7.21 kB        96.9 kB
#15 27.41 └ ○ /robots.txt                            0 B                0 B
#15 27.41 + First Load JS shared by all              80.9 kB
#15 27.41   ├ chunks/114-bd57f7329c784e37.js         26.3 kB
#15 27.41   ├ chunks/bf6a786c-0467ff1ae5f961b7.js    52.7 kB
#15 27.41   ├ chunks/main-app-46e10138c02ff0df.js    214 B
#15 27.41   └ chunks/webpack-e0cf9e931787387f.js     1.74 kB
#15 27.41 
#15 27.41 Route (pages)                              Size     First Load JS
#15 27.41 ─ ○ /404                                   182 B          79.9 kB
#15 27.41 + First Load JS shared by all              79.7 kB
#15 27.41   ├ chunks/framework-8883d1e9be70c3da.js   45 kB
#15 27.41   ├ chunks/main-7e37f7451a4c4039.js        32.7 kB
#15 27.41   ├ chunks/pages/_app-52924524f99094ab.js  195 B
#15 27.41   └ chunks/webpack-e0cf9e931787387f.js     1.74 kB

the interesting bit is that the /404 route is compiled under pages app.

the first thing I tried is to create app/not-found.tsx, but it did not serve to replace that pages route, we just see this added:

#15 27.52 Route (app)                                Size     First Load JS
#15 27.52 ┌ ○ /                                      486 B          92.2 kB
#15 27.52 ├ ○ /_not-found                            0 B                0 B
...

Expected Behavior

and this has caught my eye mainly because of a recent commit that gives processes names:

Screenshot 2023-07-23 at 00 43 47

as you can see the standalone build is allocating a next-render-worker-pages and from my understanding just to serve a 404 route.

if that's the case maybe there's a way to avoid spawning extra processes.

Which browser are you using? (if relevant)

No response

How are you deploying your application? (if relevant)

kubernetes, standalone

@masterkain masterkain added the bug Issue was opened via the bug report template. label Jul 22, 2023
@icyJoseph
Copy link
Contributor

Refer to: #49796 (comment)

@masterkain
Copy link
Author

masterkain commented Aug 3, 2023

should be solved by #53523

@timneutkens
Copy link
Member

This would not be solved by #53523 fyi.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue was opened via the bug report template.
Projects
None yet
Development

No branches or pull requests

3 participants