i am trying to include slick plugin into magento 2 through custom theme by requirejs but pub/static/_requirejs folder + files are not being generated on code deploy. file structure is following:

  1. /app/design/frontend/Vendor_Name/Theme_Name/requirejs-config.js
  2. /app/design/frontend/Vendor_Name/Theme_Name/web/js/slick.js and slick.min.js
  3. /app/design/frontend/Vendor_Name/Theme_Name/web/css/source/vendor/slick.less and slick-theme.less

Code for requirejs-config.js is as follows:

 `var config = {
           paths: {
           shim: {
               slick: {
               deps: ['jquery']

This is not a duplicate question, i have not found any solution on internet in last two days. Do let me know if any thing else needed regarding this question if it is not clear. I have followed this tutorial: https://inchoo.net/magento-2/magento-2-slick-carousel/

but i am stuck on point 7 as "requirejs-config.js" is not getting included may be because pub/static/_requirejs folder is not being generated on deploy

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

Please help me as i am stuck on this issue from last 2 days

Screenshot of View-source is: View-source of head block

  • deploy command generates pub/static/frontend, pub/static/adminhtml folders and their needed files but not _requirejs folder Commented Jul 8, 2018 at 14:10
  • _requirejs folder creates on magento 2 lower version i.e. on 2.1.x but not on Magento 2.2.x Commented Jul 9, 2018 at 9:12
  • then how should I add 3rd party custom plugins in magento 2.2.x through require.js or any other way? Commented Jul 9, 2018 at 13:38
  • Do you want to add external js to your website? Commented Jul 9, 2018 at 13:39
  • yes.. like slick carousel, scroll bars or any other plugins Commented Jul 9, 2018 at 13:40

1 Answer 1


You need to check the if requirejs-config.js loads slick or not on below path:


If its exist there then check the page by view source if its loads the same there or not on below path:


It should load there but according to the screenshot you have shared, requirejs-config.js is not loaded on your browser that means either you have created new layout which removed the block or you have removed some block which add requirejs to the page.

You can debug it by enabling luma theme and also disabled the other customization you have made.

Hope this helps!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.