Skip to content

Favicon not found with file-based metadata in standalone build #48962

@BigOoga

Description

@BigOoga

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: #67-Ubuntu SMP Mon Mar 13 14:22:10 UTC 2023
    Binaries:
      Node: 16.19.0
      npm: 8.19.3
      Yarn: 1.22.19
      pnpm: 7.21.0
    Relevant packages:
      next: 13.3.1-canary.18
      eslint-config-next: 13.3.1
      react: 18.2.0
      react-dom: 18.2.0

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

App directory (appDir: true), Metadata (metadata, generateMetadata, next/head, head.js), Standalone mode (output: "standalone")

Link to the code that reproduces this issue

https://github.com/BigOoga/standalone-metadata-bug

To Reproduce

Run docker-compose up --build to build the image and run the container

Describe the Bug

Going by the error
Error: ENOENT: no such file or directory, open '/app/src/app/favicon.ico'
The server tries to open the image path as if running the server with next start.

Expected Behavior

I'd expect the standalone build to correctly bundle the favicon and correctly path to it.

Which browser are you using? (if relevant)

No response

How are you deploying your application? (if relevant)

dockerized standalone build

Metadata

Metadata

Assignees

Labels

MetadataRelated to Next.js' Metadata API.OutputRelated to the the output configuration option.bugIssue was opened via the bug report template.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions