Urgent.News

What's breaking now, across thousands of outlets.

Tech

pdfjs-dist standard_fonts Missing in Next.js standalone

The short version pdfjs-dist's standard_fonts/ is read in a way Next.js file tracing cannot follow, so it can go missing from an output: "standalone" build. The effect of the omission is quiet. Missing fonts do not raise an exception; only text extraction from PDFs using the standard fonts (Helvetica and the rest) breaks. Making the inclusion explicit in configuration ( outputFileTracingIncludes…

In Next.js, when building a standalone application, the pdfjs-dist library's standard_fonts directory may be missing from the output. This can cause text extraction from PDFs using standard fonts (Helvetica, etc.) to break, but it does not raise an exception. The issue arises because the path to standard_fonts/ is resolved at runtime through dynamic file access, and Next.js's file tracing does not follow this runtime resolution.

To resolve the issue, the inclusion of standard_fonts/ should be explicitly stated in the Next.js configuration. Additionally, a fail-fast guard can be implemented at production startup to detect if the standard_fonts/ directory goes missing.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

One clip-path doubled my browser cat's CPU cost in Chrome's GPU process

I made Tabloaf , a pixel cat for Chrome and Firefox. It walks across whatever page you have open, sits on pictures and headings, and chases a ball of yarn.

  • Chrome's GPU process increased from 15-17% to around 7% due to clip-path feature
  • Firefox's page process dropped from 19-20% to approximately 2% after optimizations
  • Optimized Tabloaf maintained consistent 17.5 ms frame time with no frame exceeding 20 ms

The BIGINT Problem Explained

What Happens When Your Database Reaches 1 TB? How a growing events platform like Matoo helps us understand database limits, performance challenges, and the need to plan for scale.

  • BIGINT(20) supports up to 9.2 quintillion values, unlikely to be exhausted through normal use.
  • Indexes improve data retrieval efficiency but add storage overhead as database grows.

Brain Frizz, Part 1: Blocking My Day

Brain Frizz, Part 1: Blocking My Day I review a lot of pull requests (PRs) now. Some of that is the job. As a staff engineer, part of my work is helping other people get unstuck, and on a team where…

  • Engineer experiences "brain frizz" during workday
  • Divides day into fixed blocks for specific tasks
  • Tracks brain frizz levels twice daily during experiment

21 Days to Build a Coding Habit? The Real Study Found 66. Some People Needed 254.

The "21 days to form a habit" rule came from a plastic surgeon watching people get used to their new noses. Not from a lab. Not from a habit study. From a preface. I went looking for it because I'd tried the 21-day thing twice with a daily LeetCode habit, and both times I quit somewhere around week four, feeling like I'd failed a test…

  • 21-day rule originated from plastic surgeon Maltz's observations, not scientific research
  • Study by Lally et al. found median habit formation takes 66 days, range 18-254 days
  • Consistent practice, small manageable habit, and specific cue help establish coding habit

More from Thursday 19 November →