cancel
Showing results for 
Search instead for 
Did you mean: 

Uncaught Type Error in magento 2, JS not loaded properly

SOLVED
   Did you know you can see the translated content as per your choice?

Translation is in progress. Please check again after few minutes.

Uncaught Type Error in magento 2, JS not loaded properly

I am integrating a new theme in Magento 2.2. Also I used some third party JS like bootstrap select menu, owl carousel and wow js for animation.

 

  1. I use all my third party js inside require js with a custom module.
  2. Also I edit the js with define([
    'jquery'
    ], function () {

});

 

js_errors_meg_template.png

 

I just want to know how can I resolve this because it is stuck my performance sometime.

 

If any one know the idea how to resolve this please let me know.

I run the upgrade, static-deploy, cache clear, reindex command many times.
Please let me know if you want more information.

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Uncaught Type Error in magento 2, JS not loaded properly

Hi @nic023811

 

ok - i understand , run below query from your core_config_data table.

 

insert into core_config_data (config_id, scope, scope_id, path, value) values (null, 'default', 0, 'dev/static/sign', 0);

if path is already there then you need to update its value -  make sure value should be 0

 

Then after using your root privileges - removed directories by running commands like rm -rf generated , rm -rf pub/static(Except .htaccess file)

 

Then run below commands in the sequence :

 

php bin/magento setup:upgrade
php bin/magento setup:di:compile
php bin/magento setup:static-content:deploy -f
php bin/magento cache:flush


it will works !

if issue solved,Click Kudos & Accept as Solution

View solution in original post

4 REPLIES 4

Re: Uncaught Type Error in magento 2, JS not loaded properly

You need to run deployment command from root of your magento instance,

php bin/magento setup:upgrade
php bin/magento setup:static-content:deploy -f
php bin/magento cache:flush
If Issue Solved, Click Kudos/Accept As solutions. Get Magento insight from
Magento 2 Blogs/Tutorial

Re: Uncaught Type Error in magento 2, JS not loaded properly

Hi @nic023811

 

ok - i understand , run below query from your core_config_data table.

 

insert into core_config_data (config_id, scope, scope_id, path, value) values (null, 'default', 0, 'dev/static/sign', 0);

if path is already there then you need to update its value -  make sure value should be 0

 

Then after using your root privileges - removed directories by running commands like rm -rf generated , rm -rf pub/static(Except .htaccess file)

 

Then run below commands in the sequence :

 

php bin/magento setup:upgrade
php bin/magento setup:di:compile
php bin/magento setup:static-content:deploy -f
php bin/magento cache:flush


it will works !

if issue solved,Click Kudos & Accept as Solution

Re: Uncaught Type Error in magento 2, JS not loaded properly

@Manthan DaveIt works for me, Thanks

Re: Uncaught Type Error in magento 2, JS not loaded properly

Hi @Neeraj02381

 

Glad to know that , you have resolved your issue ! Happy to help and keep helping Smiley Happy

if issue solved,Click Kudos & Accept as Solution