Macos Big Sur port 80 permission denied with root
No, everything is working as intended. You need sudo to have a command line process listen on low ports. There’s nothing you want to unlock here as this is a protective feature.
I usually just test on ports higher than 1024 to avoid this risk entirely until it’s time to write a proper wrapper script, but all three options are just as suitable. (Use sudo, use setuid permissions, change the port listen number)
To use sudo - run a shell first, then the npm command
sudo -s
npm run dev
exit