I discovered that npx searches upward from the current directory for a local package. There was an unexpected node_modules in the parent directory, which it was pulling the unexpected version of the nx package from.
npx
node_modules
nx