How to Install Bootstrap 5 in Laravel 9 With Vite, Npm run dev stuck issue fix

How to Install Bootstrap 5 in Laravel 9 With Vite, Npm run dev stuck issue fix

Amazing PHP

2 года назад

15,450 Просмотров

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


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

HeLL Łuci
HeLL Łuci - 11.05.2023 19:20

I rolled throughjt the documentation and there's nothing about this resolve->alias bullshit. WHY IS THERE NOTHING ABOUT IT?+!?! tgth
úűajn
tfzskhrjnm
zrnmjzrnjm
szrtjmrz

Ответить
have fun learn fun
have fun learn fun - 11.03.2023 19:09

best

Ответить
Pierce McGeough
Pierce McGeough - 25.02.2023 14:39

Great video. 2 questions.

1. Could you explain the resolve alias code added in the vite.cong file. What does it do and how does it work?
2. How do i run it so my CSS is compiled in css and not JS

Thanks again :)

Ответить
Jairo Naranjo
Jairo Naranjo - 09.02.2023 23:20

Thank you so much great presentation. I like the way you show an outline for for the video.

Ответить
Mirazh
Mirazh - 19.11.2022 12:51

It worked for me and thanks you. subscribed.

Ответить
Steve E.
Steve E. - 28.10.2022 16:03

Great explanation! Have tryed many tutorials but only your video solved the problem ;)

Ответить
Hassam Ul Haq
Hassam Ul Haq - 23.09.2022 08:46

I'm using vite without react, vue in laravel.

Issue: i install select2, other npm packages using npm install. but these are not work by adding alias in vite config. in react, vue we use import but how to use node_packages with @import. I tried the way you showed in video but got errors like path, type="module"...

same issues with many developers on laracast even jQuery isn't work.

for now i downloaded those plugins and add in public and using asset() i use them.

any solution you know, I'll also try again to fix again.

Ответить
silvio arcich
silvio arcich - 07.09.2022 20:09

Tnx so much!!

Ответить
Elena Freim
Elena Freim - 01.09.2022 14:15

Thanks!!! I've done it!!!!

Ответить
Ryman's Pie
Ryman's Pie - 23.08.2022 16:15

The problem with Laravel creators is they shock 🤯 developers evey minor & major release.....

Ответить
Kev_10
Kev_10 - 19.08.2022 03:12

anyone getting this message when running npm run dev and was able to fix it?

> dev
> vite

file:///var/www/laravel-bootstrap/node_modules/vite/bin/vite.js:7
await import('source-map-support').then((r) => r.default.install())
^^^^^

SyntaxError: Unexpected reserved word
at Loader.moduleStrategy (internal/modules/esm/translators.js:133:18)
at async link (internal/modules/esm/module_job.js:42:21)


I cant find anything on this and been stuck for a few days :(

Ответить
Angel HR
Angel HR - 14.08.2022 08:02

hi, I have a question, if I already import the css files, and I'm working with a template, now the buttons, etc didn't work, how can I export the js files, I've trying the same. this is my Vite file:
export default defineConfig({
plugins: [
vue(),
laravel({
input: [

'resources/assets/plantilla/css/font-awesome.min.css',
'resources/assets/plantilla/css/simple-line-icons.min.css',
'resources/assets/plantilla/css/style.css',
'resources/assets/plantilla/js/jquery.js',
'resources/assets/plantilla/js/popper.js',
'resources/assets/plantilla/js/bootstrap.js',
'resources/assets/plantilla/js/Chart.js',
'resources/assets/plantilla/js/pace.js',
'resources/assets/plantilla/js/template.js'
],
refresh: true,
}),
],
resolve:{
alias:{
'~bootstrap' : path.resolve(__dirname, 'node_modules/bootstrap'),
'@': '/resources/js'
}
},
});

And this is the blade file, an example

<html>
<head>
@vite(['resources/assets/plantilla/css/font-awesome.min.css','resources/assets/plantilla/css/simple-line-icons.min.css','resources/assets/plantilla/css/style.css','resources/assets/plantilla/js/jquery.js','resources/assets/plantilla/js/popper.js','resources/assets/plantilla/js/bootstrap.js','resources/assets/plantilla/js/Chart.js','resources/assets/plantilla/js/pace.js','resources/assets/plantilla/js/template.js'])
</head>

Ответить
Tashi Paljor
Tashi Paljor - 08.08.2022 10:16

Hi, thank you for the video. I'm stuck at the error in register and login page. The error is, "Unable to locate file in Vite manifest: resources/sass/app.scss." Please help!

Ответить
Muhammad Syahrul Aulia
Muhammad Syahrul Aulia - 02.08.2022 02:06

finally, just need to change `npm run dev` to `npm run build` for me

Ответить
conan codes
conan codes - 28.07.2022 16:05

too long process but looks fine

Ответить
Bevallalom
Bevallalom - 24.07.2022 09:56

Laravel is a php framework. It's a back end side. I don't like this new trend... where I have to do tricks to use a front end css. Laravel 9 is a huge step backwards. I stick to Laravel 8 as of now. I don't understand why vite was introduced in the middle of version 9. It's a big breaking change.

Ответить
kwasi EZOR
kwasi EZOR - 21.07.2022 11:36

Thanks for the video. I've been following your steps to setup a new laravel 9 project with vite and bootstrap auth but i'm getting this issue:
error during build:
Error: Cannot find module 'node:path'
Does somebody know how to fix this one? Thanks

Ответить
JOS3
JOS3 - 20.07.2022 01:39

Works 2022

Ответить
Glécio Santos
Glécio Santos - 19.07.2022 02:41

Great! Subscribed

Ответить
Sinau Kode
Sinau Kode - 16.07.2022 17:13

Thank's I could use bootstrap, but what about the popperJS, I can't use dropdown, I think because these not include it yet, how to add popper??

Ответить
Abu Rayhan Rimon
Abu Rayhan Rimon - 16.07.2022 09:01

Error: Can't find stylesheet to import.

what can I do?

Ответить
Lone Coder
Lone Coder - 15.07.2022 22:49

profile icon is not clickable. so unable to log out. can u solve this issue?

Ответить
Nnamdi Elege
Nnamdi Elege - 15.07.2022 05:38

Thank you, mine worked correctly as you described for sometime and then after a day reverted back to one without any Bootstrap styling

Ответить
Hilman Firdaus
Hilman Firdaus - 15.07.2022 03:16

i trying installed jetstream but failed. you can tutor me about jetstream please..

Ответить
Hilman Firdaus
Hilman Firdaus - 15.07.2022 03:15

jetstream please

Ответить
Bernardo Antonio Choque Miranda
Bernardo Antonio Choque Miranda - 15.07.2022 00:27

thanks for the solution

Ответить
Quennan Serbias Tunguia
Quennan Serbias Tunguia - 13.07.2022 18:00

Thank Youu!

Ответить