I hate to state the obvious, but it's the matter of familiarity.
I've been working almost exclusively with javascript and typescript for the last 4-5 years; so that now, while trying to write an amateurish Symfony project (because shared hosting) and appreciating the maturity of Symfony, I still hate almost every moment of it and hope I could have used typescript.
Anyway, what's wrong with npm and how is it so different than composer?
The way npm install always check latest package version and use them, even if package lock already exists. Which broke apps build many many times due to developer does not recognize this behavior. I know there are npm shrinkwrap and npm ci. Its just other package manager usually follow lockfile on install and have other command to upgrade the lockfile.
Also npm install download gazilion file for each dependencies. With deep directories.
In the past, there are problem because npm way of installing dependencies and hitting this infamous windows file path length limitation.
All are now already fixed or have alternative. But at that time, composer definitely much simpler and reliable.
I've been working almost exclusively with javascript and typescript for the last 4-5 years; so that now, while trying to write an amateurish Symfony project (because shared hosting) and appreciating the maturity of Symfony, I still hate almost every moment of it and hope I could have used typescript.
Anyway, what's wrong with npm and how is it so different than composer?