Skip to content

"TypeError: The "code" argument must be of type number. Received an instance of Object" error when building the contentlayer #719

@persis-randolph

Description

@persis-randolph

When you run npm run build or contentlayer build you currently always receive this error:

"TypeError: The "code" argument must be of type number. Received an instance of Object"

This is due to the contentlayer package crashing while setting the process.exitCode since it is not a number. This doesn't actually break anything, just throws the annoying error.

The contentlayer package hasn't been worked on since 2023 so I think we can either ignore it, add a tiny wrapper script to coerce the process.exitCode to 0 before exit, or change to another package which does the same thing.

When we have a chance we should probably do one of these options, but not a big deal since it doesn't actually affect the output.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions