2

I am configuring a migrated magento site on 2.3.1 and I ran into this error "Uncaught TypeError: mixin is not a function" once before and literally solved it only by reinstalling from scratch and beginning over. But I implemented pretty strict change tracking, so today everything was working, until suddenly after making changes to a less file in our theme (in developer mode), I ran the following without errors:

473 2019-05-08 20:00:55 rm -r pub/static/frontend/* 474 2019-05-08 20:00:56 rm -r var/view_preprocessed/* 475 2019-05-08 20:00:56 rm -r var/view_preprocessing/* 476 2019-05-08 20:01:13 php n98-magerun2.phar indexer:reindex 477 2019-05-08 20:01:22 php n98-magerun2.phar setup:di:compile 478 2019-05-08 20:07:06 php n98-magerun2.phar

setup:static-content:deploy en_US -f

and to track changes, I follow this with:

php n98-magerun2.phar module:status > app/code/Lucuma/trackconfig/track-mod-status.php
php n98-magerun2.phar sys:check  > app/code/Lucuma/trackconfig/track-sys.php
php n98-magerun2.phar sys:info >> app/code/Lucuma/trackconfig/track-sys.php
php -v >> app/code/Lucuma/trackconfig/track-sys.php
php n98-magerun2.phar  config:show > app/code/Lucuma/trackconfig/track-config.php
chmod 750 app/code/Lucuma/trackconfig/*
php n98-magerun2.phar  sys:maintenance --off

git status

and suddenly most of the js file in lib/web were 0 bytes, e.g.

$ ls -la lib/web/requirejs
...
-rw-rw----  1 www-data www-data     0 May  8 20:07 domReady.js
-rw-rw----  1 www-data www-data     0 May  8 20:07 require.js
-rw-rw----  1 www-data www-data 15610 May  7 07:07 text.js

No errors in log files. System setup is:

n98-magerun2 version 3.0.8 by netz98 GmbH
PHP 7.2.16 
  Magento System Information  
| Name             | Magento     
| Version          | 2.3.1         
| Edition          | Community
| Application Mode | developer           
| Session          | db    
| Crypt Key        | xxxxxx    
| Install Date     | Wed, 27 Mar 2019 05:40:59 +0000       
| Cache Backend    | Cm_Cache_Backend_File       
| Vendors          | Magento, Amasty, MSP, Magefan, CyberSource, Klarna, Ebizmarts, Dotdigitalgroup, Mageplaza, Temando, Vertex, Yosto |

changes between when ok and when broken:

output from php n98-magerun2.phar  config:show > app/code/Lucuma/trackconfig/track-config.php
git diff app/code/Lucuma/trackconfig/track-config.php
-amasty_base/system_value/remove_date - 1557289817
+amasty_base/system_value/remove_date - 1557342741

out put of php n98-magerun2.phar  module:status > app/code/Lucuma/trackconfig/track-mod-status.php
git diff app/code/Lucuma/trackconfig/track-mod-status.php
@@ -221,6 +221,11 @@ Mageplaza_Core
 Mageplaza_Smtp
 Temando_Shipping
 Vertex_Tax
+Yosto_AddressAttribute
+Yosto_AttributeRelation
+Yosto_CustomerAddress
+Yosto_CustomerAttribute
+Yosto_OrderAttribute

List of disabled modules:

Amazon_Core
@@ -230,9 +235,4 @@ Magento_Dhl
 Firebear_ImportExport
 Magento_ReviewAnalytics
 Magento_SampleData
-Yosto_AddressAttribute
-Yosto_AttributeRelation
-Yosto_CustomerAddress
-Yosto_CustomerAttribute
-Yosto_OrderAttribute

So I reversed the module changes and used git checkout to recover lib/web. Then once again I run:

php bin/magento setup:upgrade
php bin/magento cache:clean
rm -R pub/static/*
rm -r var/view_preprocessed/*
rm -r var/view_preprocessing/*
php bin/magento cache:flush
php bin/magento  indexer:reindex
php bin/magento  setup:di:compile
php -d memory_limit=5G bin/magento setup:static-content:deploy en_GB en_US -f

track status

php n98-magerun2.phar module:status > app/code/Lucuma/trackconfig/track-mod-status.php
php n98-magerun2.phar sys:check  > app/code/Lucuma/trackconfig/track-sys.php
php n98-magerun2.phar sys:info >> app/code/Lucuma/trackconfig/track-sys.php
php -v >> app/code/Lucuma/trackconfig/track-sys.php
php n98-magerun2.phar  config:show > app/code/Lucuma/trackconfig/track-config.php
chmod 750 app/code/Lucuma/trackconfig/*
php n98-magerun2.phar  sys:maintenance --off

#git status

On branch master
Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git checkout -- <file>..." to discard changes in working directory)

    modified:   app/code/Lucuma/trackconfig/track-config.php
**git diff shows only:**
-amasty_base/system_value/remove_date - 1557289817
+amasty_base/system_value/remove_date - 1557342741

Seems innocent, but now I get "Uncaught TypeError: mixin is not a function" on the client side when before it worked. I hate to just roll back the code and database without knowing why this error occurs.I have tried enabling and disabling various modules to no avail.

Would love to know what might have corrupted lib/web as perhaps that changed something else that git is not tracking??? Thank you!

2
  • This is happening because of your custom modules as far as i know, sonce because I ran into same issue after been migrated. Check your custom modules which has mixin. May 9, 2019 at 8:45
  • I suspect you are right, only I haven't been able to track the mixin error back to the original module. Now that I have source control on the vendor folder, I hope to learn which module is doing something during a "magento setup:upgrade" that it shouldn't. May 10, 2019 at 16:21

2 Answers 2

0

I was able to "solve" this error at last by clearing the vendor folder of everything except the .htaccess file and then doing a "composer update" to restore it. Steps were:

rm -r vendor/*
php composer.phar update
php bin/magento setup:upgrade
php bin/magento cache:clean
rm -R pub/static/*
rm -r var/view_preprocessed/*
rm -r var/view_preprocessing/*
php bin/magento cache:flush
php bin/magento  indexer:reindex
php bin/magento  setup:di:compile
php -d memory_limit=5G bin/magento setup:static-content:deploy en_GB en_US -f

Then after verifying it worked I added vendor folder to git. Also, I know there are security issues with my current way of tracking, particularly using version control on this file.

php n98-magerun2.phar  config:show > app/code/Lucuma/trackconfig/track-config.php

But in order to try configuration changes that cause errors, I feel it's worth it until we are ready to go to production. Obviously a way to strip out the secret bits would be better.

0

this was indeed a 3rd party module go to the deployed requireJSconfig and just remove the mixins one by one until you find it. .for me it was Swissup_Gdpr

Your Answer

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

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