diff --git a/lib/internal/errors.js b/lib/internal/errors.js index 15d04db3132271..206724eacb6f52 100644 --- a/lib/internal/errors.js +++ b/lib/internal/errors.js @@ -946,14 +946,7 @@ E('ERR_INVALID_ARG_TYPE', const type = name.includes('.') ? 'property' : 'argument'; msg += `"${name}" ${type} `; } - - // determiner: 'must be' or 'must not be' - if (typeof expected === 'string' && expected.startsWith('not ')) { - msg += 'must not be '; - expected = expected.replace(/^not /, ''); - } else { - msg += 'must be '; - } + msg += 'must be '; const types = []; const instances = [];