Uncaught TypeError: $.initNamespaceStorage is not a function
might occur, which refers to line 7 in vendor/dhl/module-ui/view/frontend/web/js/model/checkout/storage.js:
var t = $.initNamespaceStorage("dhl_shipping_data_storage").localStorage
This is because jquery/jquery-storageapi might not have been loaded already. To fix the issue, vendor/dhl/module-ui/view/frontend/web/js/model/checkout/storage.js needs to require jquery/jquery-storageapi in its define like:
define([
'jquery',
'Magento_Checkout/js/model/quote',
'jquery/jquery-storageapi'
], function ($, quote) {
When using JS bundling techniques, the error
might occur, which refers to line 7 in
vendor/dhl/module-ui/view/frontend/web/js/model/checkout/storage.js
:This is because
jquery/jquery-storageapi
might not have been loaded already. To fix the issue,vendor/dhl/module-ui/view/frontend/web/js/model/checkout/storage.js
needs to requirejquery/jquery-storageapi
in itsdefine
like: