tailwind don't builded in laravel sail. without errors - laravel

I try to install the tailwindcss in my laravel project and it doesn't work. i have no errors or crashes. i used the guide from tailwindcss docs. But i up project on laravel Sail in docker, and all this be on windows wsl 2. Can someone help me? here is the result
i tried to reinstall all project and i have no changes. next tried to do
sudo apt-get update
sudo apt-get upgrade
and still no changes. Next i tried use root to reinstall
sail npm install -D tailwindcss postcss autoprefixer
sail npx tailwindcss init -p
but it doen't help me too

Related

trying to install sass and getting an error about the webpack

I am trying to install sass in a Vue project, I'm getting an error so I've tried to --force, even though I was able to see sass-loader in devDependencies when npm run serve I am getting an error about lang="sass", so I decided to npm uninstall sass-loader and node-sass, so I am starting again.
What should I do?
my error
wasn't to diffucult, because I am using zsh in my terminal I had to wrap in quotation
zsh: npm install -D 'sass-loader#^10' sass
and that's it

Tailwind CSS Laravel Mix Error - Forces PostCSS 8 to be installed

I recently created a new laravel 8 project using Breeze for the authentication and tailwind css. All worked perfectly when running npm run watch but once I run npm run prod I ran into errors. I noticed that the Tailwind docs mention that there are PostCSS issues so you need to unistall and run
npm install tailwindcss#npm:#tailwindcss/postcss7-compat #tailwindcss/postcss7-compat postcss#^7 autoprefixer#^9
I done that however every time I run npm run prod now the build quits at 98% and says
Additional dependencies must be installed. This will only take a moment.
Running: npm install postcss#^8.1 --save-dev --legacy-peer-deps
npm WARN browser-sync-webpack-plugin#2.2.2 requires a peer of webpack#^1 || ^2 || ^3 || ^4 but none is installed. You must install peer dependencies yourself.
Finished. Please run Mix again.
This auto updates PostCSS to 8.1 every time.
After that if I run npm run prod again it does the exact same message over and over.
I've tried removing the browsersync plugins and trying again but it still doesn't work.
Anyone ran into this or got a solution?
laravel-mix v6 now supports PostCSS8
According to tailwind docs, it suggests to use npm install tailwindcss#npm:#tailwindcss/postcss7-compat #tailwindcss/postcss7-compat postcss#^7 autoprefixer#^9
With the new Mix v6, run npm install tailwindcss#latest postcss#latest autoprefixer#latest
After this, npm run prod will run the way it should.
you must upgrade laravel mix using the following command
npm install laravel-mix#latest
As Digvijay mentioned above the new Mix v6 now supports PostCSS 8. So run:
npm install tailwindcss#latest postcss#latest autoprefixer#latest
After the when you run npm run prod you will still get this message:
Additional dependencies must be installed. This will only take a moment.
Running: npm install browser-sync browser-sync-webpack-plugin#2.2.2 --save-dev --legacy-peer-deps
npm WARN browser-sync-webpack-plugin#2.2.2 requires a peer of webpack#^1 || ^2 || ^3 || ^4 but none is installed. You must install peer dependencies yourself.
Finished. Please run Mix again.
To fix this just add sudo to the front of the npm command it ran:
sudo npm install browser-sync browser-sync-webpack-plugin#2.2.2 --save-dev --legacy-peer-deps
Now run npm run prod and it should work!

Laravel 7.1 authentication issue

on my project i run the following command for auth in laravel 7.1:
$ composer require laravel/ui
$ php artisan ui vue --auth
while I try to access to my project
127.0.0.1:8000/login
I got login page without any template
If you use the laravel/ui package with the Vue scaffold you also need to run:
npm install && npm run dev
to install the js dependencies and compile the Vue assets correctly.

Import Bootstrap 4 into Laravel 6

I'm a Laravel newbie, and I was trying to import Bootstrap 4 automatically with npm install and npm run dev (after setting Bootstrap with its proper version into package.json) just as I saw in some Laravel classes I'm watching.
The problem is that after I use both commands, app.css is empty. Here's what I did this far.
composer create-project --prefer-dist "laravel/laravel" cadastro
Configuring package.json ("bootstrap": "^4.3.1")
npm install
npm run dev
Is there something wrong with my steps? My Laravel version is 6.5.2.
You should run
composer require laravel/ui --dev
php artisan ui bootstrap
commands in your console to have some initial JS file with Bootstrap setup. Otherwise if resources/js/app.js file is empty, importing like this won't be enough.
You should read documentation about this.

Error executing "npm run" in fresh laravel file - Cannot find module npm-cli.js

Can someone help me on this? I'm getting error below when executing the npm run on my fresh laravel project.
I've installed new laravel file larave new vue-lar-proj
then installed modules npm install
then immediately tried to execute npm run watch I'm getting error below.
But when I tried installing the laravel file using this command
composer create-project --prefer-dist laravel/laravel vue-lar-proj "5.5.*"
I've got no problem executing the npm run watch.
I only get the error on npm run dev and npm run prod
I'm new on this, appreciate your help in advance.
I had this problem. I found out that node_modules folder did not exist. So I created this folder by:
$ npm install
I didn't install npm-cli globally. So tried to install npm-cli:
$ npm install npm-cli

Resources