如何强制npm使用jquery 2.1.1 [英] How to force npm to use the jquery 2.1.1

查看:103
本文介绍了如何强制npm使用jquery 2.1.1的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

作为node-npm的初学者,我想问这个问题.我当前的node_modules的查询版本为2.2.0.但是在同一项目中,我使用的是具有datepicker组件的materialize-css.

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.

此组件在jquery 2.1.1上运行.我的问题很简单.

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

如何从我的node_modules中删除当前的jquery [v 2.2.0]并安装jquery版本[2.1.1],以便datepicker组件正常工作.

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.

推荐答案

将特定版本添加到package.json文件

Add the specific version to your package.json file

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

这篇关于如何强制npm使用jquery 2.1.1的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆