Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to use yarn to install bootstrap 4 - libsass libraries

I'm trying to use yarn for my latest project. How to install bootstrap 4 - libsass libraries using yarn

like image 881
dragonfly Avatar asked Nov 07 '16 21:11

dragonfly


People also ask

How do I download bootstrap 4 files?

Standard Download Bootstrap files will automatically start downloading once you click on the Download button. Once the downloading is finished, you will receive a zip folder that contains compiled and minified versions of the JavaScript plugins and CSS bundles.


4 Answers

Attention:

I just realized a difference between the installations with npm install and yarn.

Here are the two commands I used:

yarn add [email protected] --dev
npm install [email protected] --save-dev

The correct/current version of bootstrap 4.0.0-alpha.6 contains this file:

/node_modules/bootstrap/scss/_tags.scss

Installed with npm, this file exists as expected. But installed via yarn, this file is missing. Even if changing bootstrap@^4.0.0-alpha.6 to [email protected] in package.json didn't fix this issue.

like image 179
TORN Avatar answered Oct 04 '22 00:10

TORN


yarn add bootstrap@4

installs the latest bootstrap 4 version (4.6.0 at aug/'21)


And you can always use

yarn add your_package@^

To view all the versions that are available

like image 45
Sam Avatar answered Oct 03 '22 23:10

Sam


Just run:

yarn add [email protected]
yarn add gulp-sass --save-dev
like image 36
dragonfly Avatar answered Oct 03 '22 23:10

dragonfly


To find the most current installation instructions, see github repo:

https://github.com/twbs/bootstrap

As of the time of this posting, instructions for installing the latest beta version of Bootstrap v4 via yarn is:

yarn add [email protected]
like image 27
Shafique Jamal Avatar answered Oct 03 '22 22:10

Shafique Jamal