The error was thrown, because magento was unable to load the script, because it is expected to be in THEME_LOCATION\Magento_Theme\web\js instead of THEME_LOCATION\web\js
Another error source was because I had to use bootstrap.bundle.js instead of bootstrap.bundle.min.js !
Also don't forget to change the path:
You need to add catalog_product_view.xml file here in this path in your theme
Content for this file is ..
<page layout="1column" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/...