I had a similiar issue and found this: Issues · evanw/esbuild · GitHub
I found this Stack Overflow answer which says that if you’re using
npm
with the root user and a package has an install script, you’ll need to add--unsafe-perm=true
to yournpm
command to get it to work. Does that work for you?
This solved the issue for me