Vite manifest not found
Full error message
I'm working on a project that is using laravel 9 and Vite with laravel-vite,
In the Dev environment everything works fine, but in production on the cPanel server I have the following issue:
Vite manifest not found at: /home/???????/cart_shop/public/build/manifest.json
# With
Missing Vite Manifest File
Did you forget to run `npm install && npm run dev`?
I tried to solve the problem but nothing work, I need to change the public folder and the sup folder build file place from vite.config.js but I don't find the way to do that.
Note that: the file sequence is changed in cPanel shared server from
- home
- public_html
- cart_shop
- Root
- public
- etc
To
- home
- public_html
- public files and folders // I changed the index URLs too.
- cart_shop
- Root
- etc
my vite.config.js config is like:
import { defineConfig } from 'vite';
import laravel from 'laravel-vite-plugin';
import vue from '@vitejs/plugin-vue';
export default defineConfig({
plugins: [
laravel({
input: 'resources/js/app.js',
}),
vue({
template: {
transformAssetUrls: {
base: null,
includeAbsolute: false,
},
},
}),
],
});Solutionsource: stackoverflow \u2197
I had the same issue only because of node version. I upgraded to the latest version and it's working properly. For Ubuntu use n module from npm in order to upgrade node: sudo npm cache clean -f sudo npm install -g n sudo n stable To upgrade to latest version (and not current stable) version, you can use: sudo n latest You may need also to Fix PATH: sudo apt-get install --reinstall nodejs-legacy # fix /usr/bin/node To undo: sudo n rm 6.0.0 # replace number with version of Node that was installed sudo npm uninstall -g n You may need to restart your terminal to see the updated node version. Found in Ask Ubuntu
API access
Get this solution programmatically \u2014 free, no authentication.
curl https://depscope.dev/api/error/e523e0b5c3cdde948b6ef40220386329e3c658e7fd6f35803ac82946fe017fb1hash \u00b7 e523e0b5c3cdde948b6ef40220386329e3c658e7fd6f35803ac82946fe017fb1