Found a post online suggesting to run the dev server using npx strapi dev - I did and everything worked.
npx strapi dev