This can be easily avoided by meeting the Union's demands.
A free labor market means laborers are free to go. If this means you have no ports, then you are not competitive on the labor market.
Corporations have gotten extremely comfortable with existing in an extremely skewed labor market. One where they do not have to pay because they don't have to be competitive - workers have zero mobility, zero visibility, and need to eat.
If the corporations cannot meet the Unions demands and that results in failure to buy or sell, that is the free market at play. They can simply pay more. Clearly, the demand for this labor is extremely high and the supply is what it is. That means pay up.