Both New Jersey and New York declared states of emergency as flash flooding and mudslides hit parts of the West Coast.