The Constitution allows for it.
In some of the early Presidential elections, some states did not hold any form of popular vote. There is no Constitutional requirement to follow any popular vote when selecting electors.
Thats true, but in that case representatives were representing their constituents. Not so under the compact. They are representing the voters of ALL the states. Thats not a republican form of government WITHIN the state, any more than it would be to apportion electoral votes based on a public opinion poll in Iran.