On cart page I am getting this error in console:
Failed to load the "Magento_GiftMessage/js/view/gift-message" component
When I disable the module Magento_GiftMessage is working but it effect some where.
On cart page I am getting this error in console:
Failed to load the "Magento_GiftMessage/js/view/gift-message" component
When I disable the module Magento_GiftMessage is working but it effect some where.
Add below code in your checkout_cart_index.xml file.
<referenceContainer name="content">
<block class="Magento\GiftMessage\Block\Cart\GiftOptions" name="checkout.cart.order.actions.gift_options" template="Magento_GiftMessage::cart/gift_options.phtml" cacheable="false">
<arguments>
<argument name="jsLayout" xsi:type="array">
<item name="types" xsi:type="array"/>
<item name="components" xsi:type="array">
<item name="giftOptionsCart" xsi:type="array">
<item name="component" xsi:type="string">Magento_GiftMessage/js/view/gift-message</item>
<item name="config" xsi:type="array">
<item name="template" xsi:type="string">Magento_GiftMessage/gift-message</item>
<item name="formTemplate" xsi:type="string">Magento_GiftMessage/gift-message-form</item>
</item>
</item>
</item>
</argument>
</arguments>
</block>
</referenceContainer>
I had checkout_cart_index.xml copied to my theme folder and which was causing the issue, upon removing the file from theme folder it removed the error. Just copy the components from vendor to theme checkout_cart_index.xml which require changes.
I removed my checkout_cart_index.xml file from my theme folder and it fixed the issue.