For NPMs you can mitigate executing malware with `--ignore-scripts`
the only real solution is a reputation system (like https://github.com/crev-dev/cargo-crev ), which of course is unfortunately barely used
Most people who can't deal with this, including myself, simply switched to other languages.
Any language with a proper standard library would do, but I found Go's modern and useful standard library to be well-worth the inefficiency and clunkyness of that language.
The more expansive the standard library is, the better.