Vite didnt load asset properly on my laravel 9 project. i've been facing this problem when using laravel 9 with Vite. first when i install laravel breeze i though the breeze is the problem, but now i try using jetstream it has the same issue. please see the screenshot below. can someone help me ?
I think you need to run the Vite server using npm run dev. That will also take care of hot reloading
I run "npm run dev" command by mistake. And website is started using dev url. I searched for a solution but never found. I found solution myself. You need to delete "hot" file in your public folder on your hosting.
In you hosting go to "public" path and delete named "hot" file.
Related
I have deployed my laravel 9 with Inertia.js & Vite to my shared hosting acccount but screen was blank because vite cannot load assets after running npm run build.
Error thrown by vite
Vite manifest not found at: /home/ljsharp1/fmcosmetics.ljsharp.com/public/build/manifest.json
How can I fix this issue please?
I have decided to migrate from vite to mix and it worked fine on the shared server. If it is a bad idea, please give your suggestion. Thanks.
I have created a RESTful API with lumen and tested it with postman. It works fine. Now I wanna develop the front end for it with Vue. What is the best way to go about it? Do I need to create a separate directory for Vue or is there a way to use it in the same lumen project directory? I have tried installing composer require laravel/ui which works fine. But then when I run php artisan ui vue it says "ui not defined". Help me out here.
I would suggest to use something like this starter kit. Down the line it will save your time.
I don't know Vue.js. I have just cloned one project from GitHub and now I want to edit come Vue template code. After updating the class of p tag, I am still getting old class when I refresh the page.
I think I need to re-generate or re-compile like something but don't know how as it's my first time with Vue.js.
Please help me
You need to install node modules and their dependencies from package.json stored in root directory of your laravel project:
Run
npm install
And then after node modules are installed:
npm run dev
To compile the assets.
See more about frontend and vue in laravel here:
https://laravel.com/docs/5.7/frontend
I have an Ubuntu VPS with Laravel v5.6 served with nginx, and I am trying to use React on the front-end. I don't know if this is possible what I want to do is:
use node and npm to build my front-end app locally,
generate the CSS and JS files and upload those already generated files to my VPS server,
the output should not change since as far as I know npm generates at JS and CSS files with your whole code in it
Thanks for the help, and if there is any suggestion for a different approach just let me know.
You should start to use a frontend bundling solution like webpack or parcel, they do exactly the same
If you generate your app with create-react-app it comes with webpack built-in
I am new to laravel when i download laravel and run the command php artisan serve it gives me project link http://127.0.0.1:8000/. For the first time i can access the link perfectly as long as i want but when i restart my machine and access my project with the same link it says This site can’t be reached I tried many times by installing new projects but same issue. Anyone please help
You have to run this command "php artisan serve" every time when you wanna start developing.