Magento 2 Compile error: “No tokens were provided”
In Magento 2, when you run “setup:di:compile” you may get error message:
“No tokens were provided”
That error message is caused by an empty file. You can find it using command:
1 |
find . -type f -name '*.php' -empty |
It usually comes from an additional extension, just delete the empty file and run compilation again using:
1 |
php bin/magento setup:di:compile |
I hope this will help. If you have any question, leave a comment or contact us.
Thanks.