Magento 2 Compile error: “No tokens were provided”

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:

It usually comes from an additional extension, just delete the empty file and run compilation again using:

I hope this will help. If you have any question, leave a comment or contact us.

Thanks.

Leave a Reply

Your email address will not be published.