Question

I tried to put jquery, and then it shows the errors below...

{MyTheme}/Magento_Theme/layout/default_head_blocks.xml

<?xml version="1.0"?>

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">

    <head>
        <script src="js/bootstrap.js" />
        <meta name="viewport" content="width=device-width, initial-scale=1"/>
        <link src="Magento_Theme::favicon.ico" rel="icon" sizes="32x32" />
        <font src="fonts/PlutoSansDPDRegular.ttf" />
        <css src="css/bootstrap/bootstrap.css" />    
        <css src="css/custom.css" order="100" />        
    </head>

</page>

MyTheme/Magento_Theme/require-config.js

enter image description here

Console Error

Was it helpful?

Solution

You're getting a 404 (Not Found) error on the js/output dependency from your Require Js config. This is why you're seeing the console error in the second screenshot. It is looking in your theme's (Jadlog/tema) static content files for a js/output.js file - have you got that file in your theme? If so, it could just need a static:content:deploy.

If the file exists at app/design/frontend/Jadlog/tema/web/js/output.js then try running:

php bin/magento setup:static-content:deploy pt_BR

This could potentially be the root cause of the first issue.

Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top