Yarn build or yarn develop error every installed plugin on strapi

i had the same issue but this was happening on my docker install even causing the entire docker to crash. The way I got around this issue was restarting the strapi docker container also rebuild and started the instance and it work. This also installed the plugin, not the best solution but the only way I could get around the error.