Mysterious modal error that's got everyone puzzled: Cannot properly serialize component type:

I am using
discord.js@14.13.0.

I copied this example from discordjs.guide, and simplified it a bit, though the error happens regardless:
const modal = new ModalBuilder()
        .setCustomId('myModal')
        .setTitle('My Modal');

    const favoriteColorInput = new TextInputBuilder()
        .setCustomId('favoriteColorInput')
        .setLabel("What's your favorite color?")
        .setStyle(TextInputStyle.Short);
        
    const firstActionRow = new ActionRowBuilder().addComponents(favoriteColorInput);
    modal.addComponents(firstActionRow);

    await interaction.showModal(modal);

With this, I get the error
Error: Cannot properly serialize component type: undefined
, it happens on line
modal.addComponents(firstActionRow);

This is weird! When I log
firstActionRow.components
, the component is there fine and dandy, and it's type is
4
.

I asked in #djs-help-v14, everyone is just as confused as I am! Weird. Does anyone know what's going on?
Was this page helpful?