We fixed that weirdness in Node-RED 1.2.4. however, if you installed an extra module with npm 7 before you upgraded to 1.2.6 then your package file will already have been corrupted. So downgrading node isn't going to help fix that.
The fix is to edit ~/.node-red/package.json, look under the dependency section for something like "\"~\"3.10.4" and change it to "~3.10.4".