0

I am working on a Magento 2.1.7 shop. To achieve this, I have created a child-theme of Magento Blank.

I added the latest version of Bootstrap 3 to my theme (v3.3.7). The path to bootstrap.min.js is:

app/design/frontend/{Vendor}/{Theme}/Magento_Theme/web/js/bootstrap.min.js

In

app/design/frontend/{Vendor}/{Theme}/Magento_Theme/layout/default_head_blocks.xml

I have added <script src="../Magento_Theme/web/js/bootstrap.min.js" />.

Yet I get the error: Unable to resolve the source file for 'frontend/{Vendor}/{Theme}/Magento_Theme/web/js/bootstrap.min.js' in the console.

Where is my mistake?

0

Try this :

 <script type="text/javascript" src="js/bootstrap.min.js"/>

Put js in following location :

frontend/{Vendor}/{Theme}/web/js/bootstrap.min.js

You correct your code by adding this:

<script src="Magento_Theme::js/bootstrap.min.js" />

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.