Search code examples
jquerynode.jsmaterializepickadate

How to force npm to use the jquery 2.1.1


I am asking this question as a beginner on node-npm. My current node_modules has a query version 2.2.0. But in the same project i am using materialize-css which has a datepicker component.

This component runs on jquery 2.1.1. My question is simple.

How can i remove the current jquery [v 2.2.0] from my node_modules and install jquery version [2.1.1] so that the datepicker component works.


Solution

  • Add the specific version to your package.json :

    "dependencies": {
        "jquery": "2.1.1"
    }
    

    Then, run the following command :

    npm update