How to Fix No Tokens were Provided error When run Setup:di:compile in Magento 2

Magento 2 uses setup:di:compile to generate all source code var/generation folder. It increases speed of magento 2 website (production mode). In developing an extension we can get bug with setup:di:compile command: No tokens were provided error and nothing description. How to fix it? This topic will give you some solutions

Solution 1: Check all xml file of your extension

Solution 1: Check empty files in your extension

Solution 1: Check all xml file of your extension

Maybe your extension has a incorrect xml file. It mean that, you have to check syntax of each xml files in your extension. If there is any issues, please fix it then open terminal and try again: php bin/magento setup:di:compile

Solution 2: Check empty files in your extension

The second, maybe your extension has an empty file, some file you want to use in the past but finally you forgot it.