Solved - I had to downgrade yeoman to version 4.3.1, as mentioned here: How to downgrade Yeoman on linux using npm. I was using version 5 which still seems to have this issue. I used the following commands:
npm uninstall -g yo
npm install -g [email protected]