timlrx / tailwind-nextjs-starter-blog

This is a Next.js, Tailwind CSS blogging starter template. Comes out of the box configured with the latest technologies to make technical writing a breeze. Easily configurable and customizable. Perfect as a replacement to existing Jekyll and Hugo individual blogs.
https://tailwind-nextjs-starter-blog.vercel.app/
MIT License
8.9k stars 2.07k forks source link

String.prototype.replace called on null or undefined #1024

Closed danielbui12 closed 2 months ago

danielbui12 commented 2 months ago

Describe the bug

Failed to build project

String.prototype.replace called on null or undefined

To Reproduce

  1. Run yarn build
  2. See error

Expected behavior

Build success

Screenshots

Screen Shot 2024-09-17 at 19 03 18

System Info (if dev / build issue):

Browser Info (if display / formatting issue):

Additional context Add any other context about the problem here.

danielbui12 commented 2 months ago

In the file scripts/rss.mjs, simply just mask the escape function

...
import { escape as _escape } from 'pliny/utils/htmlEscaper.js'
...
const escape = (es = "") => _escape(es)
...