PROBLEM
Whenever we install universal router forge install uniswap/universal-router as mentioned in the swapping documentation in Uniswap V4 (https://developers.uniswap.org/docs/protocols/v4/guides/swapping/swapping), it installs the latest tag, which is v1.6. Unfortunately, that lacks the V4_SWAP command, but in the guide, they are using that command.
FIX
In order to fix that, we need to install the main branch instead of the latest tag.
forge install Uniswap/universal-router@main
PROBLEM
Whenever we install universal router
forge install uniswap/universal-routeras mentioned in the swapping documentation in Uniswap V4 (https://developers.uniswap.org/docs/protocols/v4/guides/swapping/swapping), it installs the latest tag, which is v1.6. Unfortunately, that lacks theV4_SWAPcommand, but in the guide, they are using that command.FIX
In order to fix that, we need to install the main branch instead of the latest tag.
forge install Uniswap/universal-router@main