Preventing the importation of labor is not going to solve the problem. All it does is cause the company to move operations offshore. If that was made illegal, then foreign owned companies would then outcompete domestic companies. I suppose you could then put a tariff wall around the country, but historically that hasn't worked out well (Smoot-Hawley).
The thing is, you cannot wish or legislate away the existence of skilled labor from outside the country.