Build error on sec-remarks related to YOUTUBE_REGEX
rufuspollock opened this issue · comments
Rufus Pollock commented
Some reason build is failing on sec-remarks note
11:38:36 AM: info - Compiled successfully
11:38:36 AM: info - Collecting page data...
11:38:40 AM: info - Generating static pages (0/302)
11:38:42 AM: info - Generating static pages (75/302)
11:38:43 AM: info - Generating static pages (150/302)
11:38:43 AM: info - Generating static pages (226/302)
11:38:44 AM: Error occurred prerendering page "/notes/sec-remarks". Read more: https://nextjs.org/docs/messages/prerender-error
11:38:44 AM: TypeError: Cannot read properties of null (reading '1')
11:38:44 AM: at Paragraph (/opt/build/repo/site/.next/server/pages/[...slug].js:509:77)
Debugging in dev mode get more informative:
What i can't work out is why this regex is matching at all in that doc as no href links at all.
Testing locally have found that YOUTUBE_REGEX is testing true on https://www.sec.gov/news/speech/gensler-remarks-crypto-markets-040422
Rufus Pollock commented
@khalilcodes suggest we remove YOUTUBE_REGEX everywhere if we can and just use YOUTUBE_ID_REGEX.