Open mhemon opened 2 months ago
Based on the error message you provided, it seems like the build process is encountering issues when trying to export the /favicon.ico
path. Here are some general steps you can take to troubleshoot and potentially resolve this issue:
Ensure the Favicon Exists: Make sure that the favicon.ico
file is located in the public
folder at the root of your Next.js project. The public
folder is where static files should be placed in Next.js.
Check for Typos or Path Issues: Verify that there are no typos in the file name and that the path referenced in your HTML or JSX files is correct. The standard path for the favicon in a Next.js project would be /favicon.ico
if placed directly inside the public
folder.
Review Custom Webpack Configuration: Since your project uses a custom Webpack configuration, ensure that there are no configurations inadvertently affecting the handling or path of static assets like the favicon. For example, ensure that CopyWebpackPlugin
is not misconfigured to exclude or incorrectly handle the favicon file.
Check for Server-Side Configurations: If your project includes custom server-side configurations or rewrites that might affect the serving of static files, review those to ensure they are not interfering with the serving of the favicon.
Build and Export Logs: Since the issue occurs during the build process, carefully review the build and export logs for any warnings or errors specifically mentioning the favicon or static assets. This can provide clues to the underlying issue.
Without specific error messages or a detailed description of how the favicon is being handled in the project, these general steps are the best course of action to troubleshoot and potentially resolve the issue.
In your project, the favicon.ico
file is not directly referenced within the provided HTML or JSX files. Instead, the project uses different sizes of icons for various purposes, such as for Apple touch icons and different sizes for favicon images in PNG format. The references to favicon-related icons are as follows:
<link rel="apple-touch-icon" sizes="180x180" href="/api/logo?type=apple-touch-icon" />
<link rel="icon" type="image/png" sizes="32x32" href="/api/logo?type=favicon-32" />
<link rel="icon" type="image/png" sizes="16x16" href="/api/logo?type=favicon-16" />
There is no direct mention of a favicon.ico
file in the provided context. Instead, the project seems to use an API endpoint (/api/logo?type=
) to dynamically serve icons based on the specified type in the query parameter.
In your next.config.js
file, there are no custom configurations that directly affect the handling of the favicon.ico
file. However, the project does use Next.js rewrites, which can alter how URLs are resolved server-side, potentially impacting the serving of static files. The next.config.js
file contains an async rewrites()
function that returns a configuration object with beforeFiles
and afterFiles
arrays. These arrays define custom rewrite rules that can modify the request paths.
Additionally, the project's use of the CopyWebpackPlugin
in the webpack configuration could potentially affect how and where favicon.ico
or other static assets are served from, depending on the project's structure and requirements.
I hope this helps! If you're still encountering issues, could you provide more details about your project's structure and how you're handling static assets like the favicon? This could help in identifying the root cause of the issue.
I had the same issue, that seemed to originate from the favicon.ico
being at the root of /apps/web/app
. I created a /public
directory in apps/web/app
and put favicon.ico
in it, build succeeded after that.
Hello Everyone, I have faced some problems on
yarn build
it says Export encountered errors on the following paths: @calcom/web:build: /favicon.ico/route: /favicon.icoHere is the command line output:- @calcom/web:build: @calcom/web:build: > Export encountered errors on the following paths: @calcom/web:build: /favicon.ico/route: /favicon.ico @calcom/web:build: ERROR: command finished with error: command (G:\Project\Work\cal.com\apps\web) C:\Users\User\AppData\Local\Temp\xfs-c04a550a\yarn.cmd run build exited (1) @calcom/web#build: command (G:\Project\Work\cal.com\apps\web) C:\Users\User\AppData\Local\Temp\xfs-c04a550a\yarn.cmd run build exited (1)
Tasks: 6 successful, 7 total Cached: 2 cached, 7 total Time: 3m3.386s Failed: @calcom/web#build
ERROR run failed: command exited (1)