You should use Node >= v22.
You may refer to this topic, too: Error ERR_INVALID_ARG_TYPE while Generating [Resolved]