Update jquery form 2.2.4 to 3.6.0

Hello,
We are using a lot of packages based on jquery 1.11.11/2.2.4 and we would like to upgrade jquery to 3.6.0 (or to remove jquery dependies when possible).

It seems we run jquery 2.2.4

console.log(jQuery.fn.jquery);
2.2.4

When we run meteor update we obtains this

Newer versions of the following indirect dependencies are available:
 * jquery 1.11.11 (3.0.0 is available) 

In the code : https://github.com/meteor/meteor/blob/ffcfa5062cf1bf8a64ea64fef681ffcd99fe7939/packages/non-core/jquery/package.js
I can read :

// Note that you can meteor npm install jquery (any version) into your
// application’s node_modules directory, and the meteor/jquery package
// will use that version instead of 1.12.1.

But is this going to break all other packages depending on jquery 1.11.1 ?

I read this thread : Replace Meteor base Jquery for the NPM one - #12 by evolross
But again I am not sure how to apply the advices.

Any advises on how to update jquery ?

This is an extract from meteor list --tree


β”œβ”€β”¬ j4507:datatables-bootstrap-3@0.2.5        
β”‚ β”œβ”€β”¬ jquery@1.11.11                          
β”‚ β”‚ └── modules@0.16.0 (expanded above)                         

β”œβ”€β”¬ rajit:bootstrap3-datepicker@1.7.1_1       
β”‚ └── jquery@1.11.11 (expanded above)         

                          

β”œβ”€β”¬ ajduke:bootstrap-tagsinput@0.7.1          
β”‚ β”œβ”€β”€ jquery@1.11.11 (expanded above)         
β”‚ └── twbs:bootstrap@3.3.6         

β”œβ”€β”¬ chrismbeckett:toastr@2.1.2_1              
β”‚ └── jquery@1.11.11 (expanded above)  

β”œβ”€β”¬ dschulz:jquery-qrcode@1.0.2               
β”‚ └── jquery@1.11.11 (expanded above)   

β”œβ”€β”¬ gadicohen:reactive-window@1.0.6           
β”‚ β”œβ”€β”€ blaze@2.4.0 (expanded above)            
β”‚ β”œβ”€β”€ jquery@1.11.11 (expanded above)         

β”œβ”€β”¬ meteor-platform@1.2.6                     
β”‚ β”œβ”€β”€ autoupdate@1.7.0 (top level)            
β”‚ β”œβ”€β”€ blaze@2.4.0 (expanded above)            
β”‚ β”œβ”€β”€ check@1.3.1 (expanded above)            
β”‚ β”œβ”€β”€ ddp@1.4.0 (expanded above)              
β”‚ β”œβ”€β”€ deps@1.0.12 (expanded above)            
β”‚ β”œβ”€β”€ ejson@1.1.1 (expanded above)            
β”‚ β”œβ”€β”€ fastclick@1.0.13                        
β”‚ β”œβ”€β”€ jquery@1.11.11 (expanded above)   

β”œβ”€β”¬ mizzao:bootboxjs@4.4.0                    
β”‚ └── jquery@1.11.11 (expanded above)         

β”œβ”€β”¬ mizzao:jquery-ui@1.12.1                   
β”‚ β”œβ”€β”€ jquery@1.11.11 (expanded above)         

β”œβ”€β”¬ peppelg:bootstrap-3-modal@1.0.4           
β”‚ β”œβ”€β”€ jquery@1.11.11 (expanded above)         

β”œβ”€β”¬ sergeyt:typeahead@1.2.0                   
β”‚ β”œβ”€β”€ blaze@2.4.0 (expanded above)            
β”‚ β”œβ”€β”€ jquery@1.11.11 (expanded above)         
β”‚ └── ui@1.0.13 (expanded above)    

β”œβ”€β”¬ tsega:bootstrap3-datetimepicker@4.17.47   
β”‚ β”œβ”€β”€ jquery@1.11.11 (expanded above)         

β”œβ”€β”¬ tap:i18n@1.8.2                            
β”‚ β”œβ”€β”€ check@1.3.1 (expanded above)            
β”‚ β”œβ”€β”€ coffeescript@1.0.17 (expanded above)    
β”‚ β”œβ”€β”€ jquery@1.11.11 (expanded above)    


└─┬ xvendo:barcoder@0.0.3                     
  β”œβ”€β”€ jquery@1.11.11 (expanded above)  

                      
β”œβ”€β”¬ iron:router@1.1.2                         
β”‚ β”œβ”€β”¬ deps@1.0.12                             
β”‚ β”‚ └── tracker@1.2.0 (expanded above)        
β”‚ β”œβ”€β”€ ejson@1.1.1 (expanded above)            
β”‚ β”œβ”€β”¬ iron:controller@1.0.12                  
β”‚ β”‚ β”œβ”€β”¬ iron:core@1.0.11                      
β”‚ β”‚ β”‚ β”œβ”€β”€ ejson@1.1.1 (expanded above)        
β”‚ β”‚ β”‚ └── underscore@1.0.10                   
β”‚ β”‚ β”œβ”€β”¬ iron:dynamic-template@1.0.12          
β”‚ β”‚ β”‚ β”œβ”€β”€ blaze@2.4.0 (expanded above)        
β”‚ β”‚ β”‚ β”œβ”€β”€ iron:core@1.0.11 (expanded above)   
β”‚ β”‚ β”‚ β”œβ”€β”€ jquery@1.11.11 (expanded above)     
β”‚ β”‚ β”‚ β”œβ”€β”€ random@1.2.0 (expanded above)       
β”‚ β”‚ β”‚ β”œβ”€β”€ reactive-var@1.0.11 (expanded above)
β”‚ β”‚ β”‚ β”œβ”€β”€ templating@1.4.0 (expanded above)   
β”‚ β”‚ β”‚ β”œβ”€β”€ tracker@1.2.0 (expanded above)      
β”‚ β”‚ β”‚ β”œβ”€β”€ ui@1.0.13 (expanded above)          
β”‚ β”‚ β”‚ └── underscore@1.0.10                   
β”‚ β”‚ β”œβ”€β”¬ iron:layout@1.0.12                    
β”‚ β”‚ β”‚ β”œβ”€β”€ blaze@2.4.0 (expanded above)        
β”‚ β”‚ β”‚ β”œβ”€β”€ iron:core@1.0.11 (expanded above)   
β”‚ β”‚ β”‚ β”œβ”€β”€ iron:dynamic-template@1.0.12 (expanded above)
β”‚ β”‚ β”‚ β”œβ”€β”€ templating@1.4.0 (expanded above)   
β”‚ β”‚ β”‚ β”œβ”€β”€ tracker@1.2.0 (expanded above)      
β”‚ β”‚ β”‚ └── underscore@1.0.10                   
β”‚ β”‚ β”œβ”€β”¬ reactive-dict@1.3.0                   
β”‚ β”‚ β”‚ β”œβ”€β”€ ecmascript@0.15.1 (top level)       
β”‚ β”‚ β”‚ β”œβ”€β”€ ejson@1.1.1 (expanded above)        
β”‚ β”‚ β”‚ └── tracker@1.2.0 (expanded above)      
β”‚ β”‚ β”œβ”€β”€ templating@1.4.0 (expanded above)     
β”‚ β”‚ β”œβ”€β”€ tracker@1.2.0 (expanded above)        
β”‚ β”‚ └── underscore@1.0.10                     
β”‚ β”œβ”€β”€ iron:core@1.0.11 (expanded above)       
β”‚ β”œβ”€β”€ iron:layout@1.0.12 (expanded above)     
β”‚ β”œβ”€β”¬ iron:location@1.0.11                    
β”‚ β”‚ β”œβ”€β”€ iron:core@1.0.11 (expanded above)     
β”‚ β”‚ β”œβ”€β”¬ iron:url@1.1.0                        
β”‚ β”‚ β”‚ β”œβ”€β”€ iron:core@1.0.11 (expanded above)   
β”‚ β”‚ β”‚ └── underscore@1.0.10                   
β”‚ β”‚ β”œβ”€β”€ jquery@1.11.11 (expanded above)       
β”‚ β”‚ β”œβ”€β”€ tracker@1.2.0 (expanded above)        
β”‚ β”‚ └── underscore@1.0.10     

UPDATE :
I have added jquery@3.0.0! in the file .meteor/packages (with exclamation mark)
Now meteor list --tree returns :

jquery@3.0.0                                  
└── modules@0.16.0
β”œβ”€β”¬ j4507:datatables-bootstrap-3@0.2.5        
β”‚ β”œβ”€β”¬ jquery@3.0.0                         
β”œβ”€β”¬ rajit:bootstrap3-datepicker@1.7.1_1       
β”‚ └── jquery@3.0.0 (top level)         

β”œβ”€β”¬ ajduke:bootstrap-tagsinput@0.7.1          
β”‚ β”œβ”€β”€ jquery@3.0.0(top level)               

β”œβ”€β”¬ chrismbeckett:toastr@2.1.2_1              
β”‚ └── jquery@3.0.0 (top level)  

β”œβ”€β”¬ dschulz:jquery-qrcode@1.0.2               
β”‚ └── jquery@3.0.0 (top level)   

β”œβ”€β”¬ gadicohen:reactive-window@1.0.6                    
β”‚ β”œβ”€β”€ jquery@3.0.0 (top level)         

β”œβ”€β”¬ meteor-platform@1.2.6                                      
β”‚ β”œβ”€β”€ jquery@3.0.0 (top level)   

β”œβ”€β”¬ mizzao:bootboxjs@4.4.0                    
β”‚ └── jquery@3.0.0 (top level)         

β”œβ”€β”¬ mizzao:jquery-ui@1.12.1                   
β”‚ β”œβ”€β”€ jquery@3.0.0 (top level)         

β”œβ”€β”¬ peppelg:bootstrap-3-modal@1.0.4           
β”‚ β”œβ”€β”€ jquery@3.0.0 (top level)         

β”œβ”€β”¬ sergeyt:typeahead@1.2.0                   
β”‚ β”œβ”€β”€ blaze@2.4.0 (top level)            
β”‚ β”œβ”€β”€ jquery@3.0.0 (top level)         
β”‚ └── ui@1.0.13 (top level)    

β”œβ”€β”¬ tsega:bootstrap3-datetimepicker@4.17.47   
β”‚ β”œβ”€β”€ jquery@3.0.0 (top level)         

β”œβ”€β”¬ tap:i18n@1.8.2                            
β”‚ β”œβ”€β”€ jquery@3.0.0 (top level)    


└─┬ xvendo:barcoder@0.0.3                     
  β”œβ”€β”€ jquery@3.0.0 (top level)  

β”œβ”€β”¬ iron:router@1.1.2                            
β”‚ β”‚ β”œβ”€β”¬ iron:dynamic-template@1.0.12            
β”‚ β”‚ β”‚ β”œβ”€β”€ jquery@3.0.0 (top level)                 
β”‚ β”‚ β”œβ”€β”€ jquery@3.0.0 (top level)        

But still

console.log(jQuery.fn.jquery);
2.2.4

Then when I perform meteor npm update --save jquery : I am still stuck to 2.2.4

If I do meteor npm update --save jquery@3.6.0 some of the plugins does not work anymore like datetimepicker, datatables but some other work like toastr.

Do you know how to progress on this ?

2 Likes

Not that it helps but I’ve got the same problem with our project.