How can I fix manifest.json not found on Laravel Cloud? I know npm run build will work correctly. But on Laravel Cloud, the first command is
composer install --no-dev
composer install --no-dev
that command run all the things before npm install. That's why I got the error. So here is how I fixed? - I removed php artisan package:discover --ansi . But I run after npm install. Is that best approach or not? How you guys handle this case?
error
- Installing squirephp/countries (v3.9.0): Extracting archive - Installing squirephp/countries-en (v3.9.0): Extracting archiveGenerating optimized autoload files> Illuminate\Foundation\ComposerScripts::postAutoloadDump> @php artisan package:discover --ansiIn Vite.php line 934: Vite manifest not found at: /Users/shaungbhone/Herd/testing/public/build/manifest.json Script @php artisan package:discover --ansi handling the post-autoload-dump event returned with error code 1
- Installing squirephp/countries (v3.9.0): Extracting archive - Installing squirephp/countries-en (v3.9.0): Extracting archiveGenerating optimized autoload files> Illuminate\Foundation\ComposerScripts::postAutoloadDump> @php artisan package:discover --ansiIn Vite.php line 934: Vite manifest not found at: /Users/shaungbhone/Herd/testing/public/build/manifest.json Script @php artisan package:discover --ansi handling the post-autoload-dump event returned with error code 1
Solution
It's because of the package:discover command. You might need to remove it and run it manually after