define([
"jquery",
"uiComponent"
],
function($, Component) {
"use strict";
return Component.extend({
initialize: function () {
return this._super();
},
test: function()
{
console.log("test""Hello world!");
}
});
});
define([
'uiComponent',
'Magento_Customer/js/customer-data',
'jquery',
'ko',
'underscore',
'sidebar',
'mage/translate',
'mage/dropdown',
'inputNumber'
], function (Component, customerData, $, ko, _, inputNumber) {
'use strict';
inputNumber.test(); // `[ERROR][ERROR] Failed to load the "Magento_Checkout/js/view/minicart" component.`
...
I also tried to fix the parameter order like Jorge Henrique explained:
define([
'uiComponent',
'Magento_Customer/js/customer-data',
'jquery',
'ko',
'underscore',
'inputNumber',
'sidebar',
'mage/translate',
'mage/dropdown'
], function (Component, customerData, $, ko, _, inputNumber) {
'use strict';
inputNumber.test(); // [ERROR] Failed to load the "Magento_Checkout/js/view/minicart" component.`
...
But now I still get this error in the console [ERROR] Failed to load the "Magento_Checkout/js/view/minicart" component.