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?
CodePudding user response:
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.
CodePudding user response:
It looks like you are running into an issue with the asset compilation process in Vite. The error message "Vite manifest not found at: /home/ljsharp1/fmcosmetics.ljsharp.com/public/build/manifest.json" indicates that Vite is unable to find the manifest file, which is generated after running the build process.
There are a few things you can try to fix this issue:
Make sure that you have run the build process correctly by running the npm run build command in your project directory. This should generate the necessary assets and create the manifest file.
Check the permissions on the build directory to make sure that Vite has the necessary permissions to access and read the files.
If you have made any changes to your Vite configuration, such as the output directory or the public path, make sure that these changes are reflected in the vite.config.js file.
If none of these solutions work, try clearing the cache and rebuilding the project. You can do this by running the following command: npm run build -- --clean.