Skip to main content

Questions tagged [requirejs]

Denotes questions related to require JS. RequireJS is a JavaScript file and module loader. It is optimized for in-browser use, but it can be used in other JavaScript environments.

Filter by
Sorted by
Tagged with
0 votes
0 answers
47 views

I want to load certain js files on all pages except checkout page. How can I add a condition in requirejs-config.js file not to load js files when user is on checkout page? In the code below, I want ...
Sejal Shah's user avatar
  • 2,193
0 votes
0 answers
160 views

Site is working fine in developer mode but when we put the site in production mode there are different files showing 404 in console and these seems default files of magento but the path of the file ...
Yogita's user avatar
  • 784
2 votes
0 answers
72 views

I'm trying to integrate Google Pay into my Cart page. But, I always get an error, it looks like this: Uncaught Error: Script error for "https://pay.google.com/gp/p/js/pay.js" https://...
Nguyễn Hoàng Tuấn's user avatar
2 votes
0 answers
659 views

I Have Installed Codazon Fastest Theme on my Manto2 site.i am facing an issue with js loading. here is my system configuration below. magento version : 2.4.5 PHP: 8.0 theme: Codazon Fastest Theme ...
sandip memariya's user avatar
0 votes
1 answer
431 views

this is phtml file located in Namespace_ModuleName/view/adminhtml/templates/js_time.phtml <div> <h4>Current Time is:</h4><span id="time_show" data-bind="text: ...
mrshiam's user avatar
  • 15
0 votes
1 answer
73 views

Situation The method "test" does exist two times. If I call it while both scripts are required, then only the last one is getting called e.g. the one from test2.js app/code/Company/Test/view/...
Black's user avatar
  • 3,409
0 votes
1 answer
437 views

Here I upgrade Magento from 2.4.3 to 2.4.5 so getting a javascript error can anyone help me how can I resolve this error? Can not find out what excatly issue
Jay Parmar's user avatar
1 vote
1 answer
197 views

Is anyone know the use of this 'custom' & when we need to use that? var config = { map: { **'custom':** { '@@@': '@@@', '@@@': 'js/@@@' ...
Dhaval Vaghela's user avatar
0 votes
1 answer
219 views

I'm trying to use Chroma library in Magento and so far I did the following two things: Created a app/design/frontend/Vendor/Theme/requirejs-config.js with the following content: var config = { deps: ...
Захар Joe's user avatar
0 votes
1 answer
2k views

We are launching a Magento 2.4.2 site, and finding that the site will sometimes load all of its Javascript components and dependencies properly, but sometimes fails to load on the custom component. In ...
vVin's user avatar
  • 36
0 votes
2 answers
65 views

Platform: Magento2 I want to import and use 3nd Jquery library in my module. Eg: https://www.jqueryscript.net/other/SEO-friendly-jQuery-Infinite-Scroll-Plugin-Clever-Infinite-Scroll.html use to create ...
Nhat Lich's user avatar
0 votes
0 answers
908 views

Uncaught TypeError: require.config is not a function at requirejs-config.js:18 at requirejs-config.js:19 at requirejs-config.js:757 (anonymous) @ requirejs-config.js:18 (anonymous) @ ...
Sonali Ghule's user avatar
0 votes
1 answer
268 views

First, I added these files to my custom theme: app/design/frontend/Custom/mytheme/web/js/jquery.fancybox.min.js app/design/frontend/Custom/mytheme/web/css/jquery.fancybox.css Then I edited app/...
zekia's user avatar
  • 660
0 votes
1 answer
95 views

I have a modal that pops up when the site detects it's on IE11. The modal is in a cms block so that the client can edit it. I have created a reference container with a custom phtml and put the script ...
totneschap's user avatar
3 votes
3 answers
298 views

When I try to add new tax rule I am getting "require is not defined" error in console which cause properly loading issue for Tax Rate, Customer Tax Class and Product Tax Class field (see ...
Nayem323's user avatar
  • 791
2 votes
1 answer
3k views

in my case i want to add a mixing for just a single line but i can't achieve that the parent js file is ==> web/vendor/magento/module-customer/view/frontend/web/js/model/customer/address.js /** * ...
mage's user avatar
  • 23
0 votes
2 answers
2k views

I'm trying to load the slick carousel into my magento theme and it generates a huge error: "Uncaught Error: Mismatched anonymous define() module". I think it must be related to require js, ...
lucas's user avatar
  • 309
4 votes
0 answers
179 views

I'm using Magento 2.4 and i'm trying to use Youtube player API with jQuery in Magento 2 .phtml file like this first: <script> require(['jquery'], function($){ var tag = document....
Padawan's user avatar
  • 135
0 votes
1 answer
619 views

I added the following in view/frontend/layout/catalog_product_view.xml: <?xml version="1.0"?> <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:...
bfontaine's user avatar
  • 124
1 vote
1 answer
1k views

I am trying to render a new KO component within a existing KO template. I have a PackagePopup component which in the template, renders a PackageFfilter component. I would like to seperate the logic ...
user2594875's user avatar
2 votes
1 answer
1k views

I have been experimenting with a custom module with KnockoutJs on the frontend in M2. I've created two components: a ProductPackage and a ProductPackagePopop. Functionally, the ProductPackage triggers ...
user2594875's user avatar
0 votes
0 answers
160 views

I am trying to add an animation library called Sal, built on pure Javascript (Does not rely on jQuery). Maybe I am missing something, but I followed the instructions on adding via require-config, and ...
user avatar
0 votes
1 answer
364 views

i'm trying to get functions from a JS file in a Knockou file, like this: quote.js define(['jquery', 'uiComponent', 'ko','Vendor_GetQuote/js/ajax-request'], function ($, Component, ko, ajaxrequest) { ...
Oscar Vazquez's user avatar
0 votes
4 answers
683 views

I try to include jQuery 3 to my project so I can use it on some CMS sites. Attempt: THEME = app\design\frontend\company\fresh\ THEME\web\js\jQuery\jquery-3.6.0.js Copy pasted the code from here to ...
Black's user avatar
  • 3,409
0 votes
0 answers
1k views

I ran into an interesting issue while trying to create a mixin for a 3rd party JS script. I created the mixin in the normal way with my requirejs-config.js like this: let config = { config: { ...
circlesix's user avatar
  • 4,351

1
2 3 4 5
11