Solving the PluginListGenerator.php Error in Magento 2
Error occurs while running the command “bin/magento setup:di:compile”
it is very hectic when all good goin code stops due to unknown issues,
One of this issue is “file not found” during compile the setup of magento 2
If you’ve ever encountered the frustrating file_put_contents error while working with Magento 2, you’re not alone. This common issue occurs during the setup:di:compile command, and the error looks something like this:
file_put_contents(~/mag246/generated/metadata/primary|global|plugin-list.php): failed to open stream: No such file or directory in mag246\vendor\magento\framework\Interception\PluginListGenerator.php
Here’s a step-by-step solution to fix this error quickly and easily.
Open PluginListGenerator.php located at vendor/magento/framework/Interception.