The National Popular Vote Interstate Compact (NPVIC) is an agreement among a group of U.S. states and the District of Columbia to award all their electoral votes to whichever presidential ticket wins the overall popular vote in the 50 states and the District of Columbia, regardless of which ticket won more votes in their individual state/district. Introduced in 2006, the compact is designed to ensure that the candidate who receives the most votes nationwide is elected president, and it would come into effect only when it would guarantee that outcome.



It’s also very clear when it says that states can’t enter into any compact without Congressional approval. Article 1, Section 10, Clause 3 is known as the Compact Clause and states:
In Virginia v. Tennessee (1893) the Supreme Court specified that Congressional approval would be needed if the agreement is “directed to the formation of any combination tending to the increase of political power in the States, which may encroach upon or interfere with the just supremacy of the United States.”
And that would probably apply here because it’s undermining the way the Electoral College was intended to work.
But you are also correct that states are free to appoint their electors as they see fit, so it’s quite the conundrum.
My assumption as a layman is that any official document or compact would be thrown out so there wouldn’t be anything on the books about a popular vote compact. States would probably still be free to individually appoint their electors to the winner of the popular vote, but then there also wouldn’t be anything holding them to that standard either.
The solution here is that the states can do it, but they all need to do it ‘independently’, without any formal agreement or compact.
Even if the agreement where to be let stand, without federal buy-in who enforces compliance? You would essentially need a sort of sub-nation to ensure some signatory who doesn’t like the results doesn’t decide to refuse their duty later.