Skip to content

build:contributor-docs fails on node.js v24 due to now-removed dirent.path (was deprecated) #1111

@nbogie

Description

@nbogie

Most appropriate sections of the p5.js website?

Other (specify if possible)
build: specifically, the content build-scripts

What is your operating system?

Mac OS

Web browser and version

n/a

Actual Behavior

Whether on main or on 2.0 branch, running npm run build:contributor-docs on node v24 fails due to use of newly-removed dirent.path (which has been deprecated for a while).

Here's the stack trace from 2.0 branch:

node:path:1339
      validateString(arg, 'path');
      ^

TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received undefined
    at Object.join (node:path:1339:7)
    at fullPathFromDirent (/hidden/p5.js-website/src/scripts/utils.ts:235:8)
    at <anonymous> (/hidden/p5.js-website/src/scripts/builders/contribute.ts:281:12)
    at Array.map (<anonymous>)
    at buildContributorDocs (/hidden/p5.js-website/src/scripts/builders/contribute.ts:280:8) {
  code: 'ERR_INVALID_ARG_TYPE'
}

Node.js v24.12.0

Expected Behavior

Expected to run without error

Steps to reproduce

on main or on 2.0 branch, run npm run build:contributor-docs on node.js v24

more notes

Would you like to work on the issue?

yes, please!

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions