Catch type error when calling install recursively