Kindly ensure that Magento 2 is set up correctly. Enter developer mode before initiating the installation. You can achieve the mode by running the following command:
bin/Magento deploy:mode:set developer –s.
It will enable the developer mode and skip compilation. You can enter default mode after successful installation of the extension.