本文介绍了如何在Laravel中降级jquery版本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Laravel中遇到了jQuery 3.5.0的一些引导问题.我试图将我的jquery降级到3.4.1版本,但是当我编辑package.json并运行composer update时,我的jquery版本没有变化.谁能解决我的问题?下面是我的package.json文件.

I'm facing some bootstrap problem with jquery 3.5.0 in Laravel. I'm trying to downgrade my jquery to 3.4.1 version but then when I edit the package.json and run composer update my jquery version doesn't change. Can anyone solve my problem?Below is my package.json file.

"devDependencies": {
    "axios": "^0.19",
    "bootstrap": "^4.0.0",
    "cross-env": "^7.0",
    "jquery": "3.4.1",
    "laravel-mix": "^5.0.1",
    "lodash": "^4.17.13",
    "popper.js": "^1.12",
    "resolve-url-loader": "^2.3.1",
    "sass": "^1.20.1",
    "sass-loader": "^8.0.0",
    "vue": "^2.5.17",
    "vue-template-compiler": "^2.6.10"
}

推荐答案

我知道已经晚了,但是对于那些像我这样四处搜寻并且需要快速解答的人,我们走了.

I know it's late, but for those who just searching around and needs a quick answer for like me, here we goes.

package.json上进行与OP相同的更改(以更改jQuery版本).

Do the same changes like OP, on package.json (to change the jQuery version).

然后在CLI上运行此命令

Then, on CLI, run this command

npm install

npm run dev

我不是NPM专家,也不是专家(也不是Laravel专家).但是,这里是解释,

I'm not the NPM guy / an expert guy (neither Laravel expert).But, here the explanation,

然后,对于npm run dev,它用于编译我们的资产(假设您使用的是Laravel默认脚手架)

Then, for npm run dev, it's for compiling our assets (Assuming you're using Laravel default scaffolding)

就是这样.希望能帮助到你. :)

That's it. Hope it helps. :)

这篇关于如何在Laravel中降级jquery版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-28 15:16
查看更多