I think you're confusing js with node. node typically doesn't run on the frontend, but can be used when developing the front but it won't be running on the users browser.
You may rail on about how npm != node, but everyone considers npm to be 'node package manager', no matter what the initialism actually stands for.
HTH