when I deployed my app of the nextjs (nextjs 15 rc) on the vercel, but found the error like this , Fontconfig error: Cannot load default config file,percheck , it wasn't caused by my code and it seems that it was caused by the server of the Vercel lacked of the fontconfig ,could your team please help install the fontconfig or do any favor?
Vercel Alum
Hi, ! Welcome to the Vercel Community
It's important to note that Vercel typically provides a complete environment for running Next.js applications, including necessary system libraries like Fontconfig. The error you're seeing is unusual and might be related to a specific configuration in your project or a temporary issue with the deployment.
Here are some steps you can take to troubleshoot and potentially resolve the issue:
Do you have any more detailed logs that could provide any clues? Look for any warnings or errors related to font configuration or library loading.
Can you make sure your next.config.js file doesn't have any unusual settings that might affect font loading or system libraries?
It's worth reviewing your package.json file to ensure you're not using any packages that require additional system libraries for font handling.
Since you're using Next.js 15 RC, there might be some instability. Consider using the latest stable version of Next.js for your production deployments - this could help us rule this out.
and per check , there shouldn't have the lib impact the system, and in the code , I just use the code here below to import the fonts I want, and it works for me, which shouldn't impact the system fonts,
importCanvasBuilderfrom'canvas';// import the node-canvas to do some of the draw actions