I am developing a laravel project.
I have the latest version of bootstrap
(4.0.0) in my package.json
.
How can I downgrade from bootstrap 4.0.0
to 3.3.7
for my laravel Project?
Asked
Active
Viewed 2,432 times
0

SherylHohman
- 16,580
- 17
- 88
- 94

Vedat
- 45
- 1
- 12
-
Depends: are you building the sources yourself? Are you using a cdn? Please provide more information. – Jerodev Jan 30 '20 at 13:39
-
Hey , this is my package json file: http://prntscr.com/qv2wdl | am build with npm install so installing latest version bootstrap. – Vedat Jan 30 '20 at 13:43
-
Does this answer your question? [How to install a previous exact version of a NPM package?](https://stackoverflow.com/questions/15890958/how-to-install-a-previous-exact-version-of-a-npm-package) – Rwd Jan 30 '20 at 14:41
2 Answers
1
You can install Bootstrap using npm:
npm install bootstrap@3 --save
For specific version - npm install bootstrap@3.3.7 --save

Foued MOUSSI
- 4,643
- 3
- 19
- 39
-
Thanks for answer but after this command updated for :"bootstrap": "^3.4.1" and still not work my style web pages.. – Vedat Jan 30 '20 at 13:48
-
-
@Vedat Just be more specific with the version i.e. `npm install bootstrap@3.3.7` (the yellow bit in the answer). – Rwd Jan 30 '20 at 14:27
-
@Rwd i got error : npm ERR! notarget No matching version found for bootstrap@3.3.7-npm. – Vedat Jan 30 '20 at 14:30
-
@Vedat remove the `-npm` from the end. It should just be `npm install boostrap@3.3.7 --save` . – Rwd Jan 30 '20 at 14:39
-
1
You just need to edit your package.json file
Replace:
"bootstrap": "^4.0.0",
to
"bootstrap": "^3.3.7",
and run npm install
That's all you need to do

Community
- 1
- 1

Faizan Sadiq
- 334
- 2
- 12
-
Hey Faizan, im trying your solution but still not working. Am restarting everything for working but nothing else. What can i do – Vedat Jan 30 '20 at 14:07
-
-
after npm install run this command npm run dev to recompile your assets – Faizan Sadiq Jan 30 '20 at 14:13
-
Then i think one issue need to be fixed Edit **app.scss** file which will found at **resources/assets/sass** make sure this file import **bootstrap 3.3.7** not **bootstrap 4**. Now **run npm run dev**. I hope this time all good to go – Faizan Sadiq Jan 30 '20 at 14:42
-
Something like **@import "node_modules/bootstrap-sass/assets/stylesheets/bootstrap";** in place of **@import '~bootstrap/scss/bootstrap';** and then run **npm run dev** – Faizan Sadiq Jan 30 '20 at 14:53