After trying all sorts of thing from upgrading my npm and nodejs versions to recreating composer create-project, this sudo was the one thing that let me pgrade from tailwind 3 to 4 using the npx tool.
sudo npx @tailwind/upgrade - works a treat.