Install Bootstrap via NPM

Install Bootstrap via NPM

Pixel Rocket

2 года назад

35,235 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

Kurt Kokoruz
Kurt Kokoruz - 17.11.2023 01:47

Everything was going great until 19 minutes in. Once the Sass Importing for the Functions, Variables and Mixins happen, it breaks. I tried adding one at a time. First the Functions - Error Can't find stylesheet to import. I saw a comment further down saying it doesnt work with BS 5.3 so I tried again with BS 5.2 Same issue. If someone knows how to resolve I would appreciate hearing from you. Thank You

Ответить
Tony Nguyen
Tony Nguyen - 11.07.2023 01:49

what is the best way to import bootstrap js? import the bootstrap bundle.min.js file in the assets/js/main.js file?

Ответить
kenta asakura
kenta asakura - 27.04.2023 16:31

Hi everything's working thanks to your tutorial 🙏 But how do I add another map like text color and background color?

Ответить
ANTHONY BLANC
ANTHONY BLANC - 20.03.2023 14:47

Excellent explanation, and very sharp vocabulary. Thanks a lot

Ответить
Ümit Yıldız
Ümit Yıldız - 08.03.2023 14:37

First of all, many thanks. There is such a beautiful and fluent narration that I had no problems in local. The page worked very stable. The only problem was in the build process. It created the necessary files in the dist folder. I threw it at my hosting for trial purposes and noticed that it didn't see the CSS. My page is displayed corrupted. Because I noticed that you don't see the corresponding css file. It is looking for the CSS path as ...href="/index.4717fcfd.css" in the HTML code. It fixed as I removed the "/" at the beginning. What is the reason of this? Why is it creating the "/" sign? How can I fix this problem.

Thanks....

Ответить
Nadine Richtsfeld
Nadine Richtsfeld - 07.03.2023 16:11

wonderful video! but i have one question:
everytime i do "npm run build" it succsessfully builds, but in the created index.html it does not find the corresponding css and js.

the created path looks somewhat like this:
<link rel="stylesheet" href="/index.c455ebbb.css">

so there is a / in front of the path. by deleting it manually it works just fine – but every build again adds it.

my path in the main.scss looks the following:
<link rel="stylesheet" href="./assets/scss/main.scss">

i would appreciate if anyone has an idea :)

thank you!

Ответить
Catalyst
Catalyst - 12.02.2023 03:37

Everything works fine, except for Dark Mode. data-bs-theme="dark" does nothing, only works with CDN. Anyone knows how to fix this?

Ответить
mycockerspaniel
mycockerspaniel - 07.02.2023 11:20

Gave more information than the linked in learning course I paid for. Thanks

Ответить
Katalin Péli
Katalin Péli - 28.01.2023 21:59

hi, I have the following error @parcel/transformer-css: Invalid state
.form-floating::before:not(.form-control:disabled) {
> | ^
2512 | position: absolute;
2513 | top: var(--bs-border-width);

Have anybody ever met this error? Thank you for help

Ответить
Jakub Frei
Jakub Frei - 23.01.2023 17:40

Dont know why, but i had to use command npx parcel src/index.html to make it work. Anyway, thx for the video, it was very helpful

Ответить
Laurentius Kollmann
Laurentius Kollmann - 22.01.2023 13:12

I love this great tutorial, but for some reason parcel doesn't work with the new bootstrap version v5.3.0-alpha1 anymore. Is there a workaround for this issue? Thanks!

Ответить
Tobias Opport
Tobias Opport - 27.12.2022 23:28

What do I do when main visual studio code does not recognize the npm command.

Ответить
Sneeit
Sneeit - 24.12.2022 16:37

Your voice is perfect. Really relaxing when learning at the same time. Thanks.

Ответить
Nabid Mustazir Jisan
Nabid Mustazir Jisan - 21.12.2022 08:15

Great Tutorial! Thank You!

Ответить
VALENTIN SHYNKEVICH
VALENTIN SHYNKEVICH - 17.11.2022 12:43

@parcel/transformer-sass: Can't find stylesheet to import.

7 │ @import "~/bootstrap/scss/functions";
│ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

src\assets\scss\main.scss 7:9 root stylesheet

Ответить
David Smith
David Smith - 17.11.2022 05:55

Excellent video, thanks!

Ответить
Steve Messer
Steve Messer - 04.11.2022 19:41

Incredibly great tutorial! Thank you!

Ответить
Srinivasan P L
Srinivasan P L - 20.10.2022 09:28

with tilde operator not working for import

Ответить
Adventure
Adventure - 16.10.2022 16:20

amazing

Ответить
Pavlo Koval
Pavlo Koval - 14.10.2022 23:38

_variables.scss when I wrote it like this it worked for me: @import "./abstracts/_variables.scss";
Thanks a lot!

Ответить
kirk allen
kirk allen - 13.10.2022 23:45

Thanks for the excellent video. It has really helped explain the process.

I'm having an issue with the npm run dev command, however. I'm getting an error

Error: Cannot find module './artifacts/index.win32-ia32-msvc.node'

and I can't get past it. Any insight?
Thanks!

Ответить
Romar Macaraeg
Romar Macaraeg - 10.10.2022 15:40

Hi this is a very great tutorial, I 'm trying to use it for php files but I'm getting an error. Is there something I need to do for PHP development?

Ответить
cobalt dupont
cobalt dupont - 30.09.2022 16:32

Yeah ! So cool :D, Just wandering what's the correct way to switch from "dev" to a "product" app so i can put my website online witout all uneccessary files ? :D

Ответить
Moisés Teixeira
Moisés Teixeira - 12.09.2022 16:39

very good video

Ответить
Zeus_t.k.m
Zeus_t.k.m - 11.09.2022 12:41

Basically Parcel is like Webpack but you don't have to configure an html-loader, minifier, images loader, etc ,etc am I right?

Ответить
ECU.ERVO
ECU.ERVO - 31.08.2022 00:40

Great great tutorial!

Ответить
sali_deejay
sali_deejay - 26.08.2022 12:40

Hi thanks for your tutorial it is helpful but I´m getting stuck on "npm run dev". I´m getting this error:
"unknown: Could not find entry: C:\Users\halli\Documents\PHP_HTML\sali_web\."
I can run the script, but it fails everytime with this error. Do you have any idea what can cause this? i couldn´t find any solution in the comments.

Ответить
Harry Bgg
Harry Bgg - 11.08.2022 12:57

Whenever trying to run "npm run build" after following your every step, it gives me this error:

"🚨 Build failed.

unknown: Could not find entry: C:\Users\Harry.bagg\Desktop\bootsrap\."

Do you know of any reason why it might be looking for bootstrap\. because it's refferenced nowhere in package.json

Ответить
robbie geiss
robbie geiss - 10.08.2022 02:41

this was so so helpful, thank you!

Ответить
Doug Crew
Doug Crew - 04.08.2022 21:44

Having the same issues as @Bálint Paládi. Here is the error from my screen,

@parcel/transformer-sass: Can't find stylesheet to import.

8 │ @import '~/bootstrap/scss/functions';
│ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

src/assets/scss/main.scss 8:9 root stylesheet
Error: Can't find stylesheet to import.

8 │ @import '~/bootstrap/scss/functions';

Any help is appreciated. Thank you!

Ответить
Muneeb Ur Rehman
Muneeb Ur Rehman - 01.08.2022 15:43

npm init not working

Ответить
TheBassUp
TheBassUp - 28.07.2022 23:14

Thanks for the video. You mentioned we have to create a new file to modify a bootstrap sass map, how would that look like?

Ответить
Trang
Trang - 20.07.2022 04:41

For Windows Users:
after "Install Parcel bundler", Open PowerShell as administrator and run (info about policy):


Set-ExecutionPolicy Unrestricted -Scope CurrentUser -Force
npm install --global --production npm-windows-upgrade
npm-windows-upgrade --npm-version latest



to avoid warning "npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead." in your VSCode terminal.

Ответить
Joseph Edwards
Joseph Edwards - 03.07.2022 16:42

Thank you so much - I was really stuck today and finding your vid was the first time it started to makes sense. You're a brilliant tutor, I look forward to hearing more from you!

Ответить
Crashy
Crashy - 02.07.2022 00:34

To brincando valeu meu primo

Ответить
Crashy
Crashy - 02.07.2022 00:33

Ensina os bagulho direto mermao, ensina os bagulho dos treco tudo errado meu primo

Ответить
Tharindu Rupasinghe
Tharindu Rupasinghe - 22.06.2022 11:31

Good one 🤘

Ответить
Logan Magnuson
Logan Magnuson - 13.06.2022 11:31

You are a life saver my friend! I've been having the same problem as Diego Vallenilla. The JavaScript for my bootstrap build would load locally but not when hosted on Netlify. I was using NPM for a package manager, but was relying on a Visual Studio plugin to recompile my sass, and I don't think my JavaScript was getting recompiled in the process. I decided to delete everything from my repo and rebuild the solution using Parcel and following your video. The JavaScript now runs and everything is working the way I want it. Keep up the great work man, your videos are awesome!

Ответить
Diego Vallenilla
Diego Vallenilla - 11.06.2022 00:05

It is necessary to use Parcel to work with bootstrap through npm?

I create a website project and deployed it to netlify, but once deployed, the javascript stops working. I just used a script tag to link the js to the bootstrap js inside node_modules folder. it works locally but it doesn't work on the server.

Is there a way to fix this? Do I need Parcel?

Btw really good video, I will be using your config for future projects for sure

Ответить
Elena Dp
Elena Dp - 10.06.2022 12:20

Thank you , I didn't understand, how did you import bootstrap code in js file?

Ответить
N4TUR3
N4TUR3 - 03.06.2022 09:04

Hey bud,

Thanks for video guide, it was really helpful and I got everything to work perfectly. Wish the very best for you!

Ответить
Bálint Paládi
Bálint Paládi - 29.05.2022 11:23

Parcel can't find my imports, even tho if I open it (ctrl+click) it opens

@parcel/transformer-sass: Can't find stylesheet to import.

│ @import "../node_modules/bootstrap/scss/functions";

Ответить
Roronoa
Roronoa - 20.05.2022 21:20

keep it up man, nice editing + you added chapters which is great

Ответить
flyingzeroc
flyingzeroc - 02.05.2022 04:15

thx pixel👍

Ответить
Paul CGG
Paul CGG - 20.04.2022 22:22

problem i got after installing saas and bootstrap through npm
- parcel sever is reacting veery slow to changes. even 5-10s for a change in my .scss file.
Almost impossible to work with such a delay....

Ответить