3

I have the problem when i run npm run build , it says mix manifest not found. It happens when i run in production.

My npm -v is 9.1.2 and running laravel 9, with "php": "^8.0.2".

Have anyone ever got this problem? enter image description hereenter image description here

I already try any suggestion to update npm, but still got this error.

  • Shouldn't the path be something like /public/build/manifest.json ? – Ademir Šehić Nov 23 '22 at 11:51
  • Yes. I have tried that too, changing the path from /public/mix-manifest.json to /public/build/manifest.json. After that, i get a diffrent error that tell me 'css/apps.js' is undifined. Have any clues? – Efendy zheng Nov 24 '22 at 02:18

2 Answers2

0

Try running npm install && npm run build.

If you are using Laravel Forge, you can edit your deploy script like:

cd /home/forge/default
git pull origin $FORGE_SITE_BRANCH

$FORGE_COMPOSER install --no-interaction --prefer-dist --optimize-autoloader

( flock -w 10 9 || exit 1
    echo 'Restarting FPM...'; sudo -S service $FORGE_PHP_FPM reload ) 9>/tmp/fpmlock

if [ -f artisan ]; then
    $FORGE_PHP artisan migrate --force
fi

npm install
npm run build

See this post for reference: https://github.com/innocenzi/laravel-vite/discussions/267

oliverbj
  • 5,771
  • 27
  • 83
  • 178
  • I am running npm install && npm run build. But still not working. I try to copy file manifest inside public/build to public and rename it to mix-manifest.json. Now i get the others errors "Unable to locate Mix file: /css/app.css.". Have any solution? – Efendy zheng Nov 23 '22 at 09:54
0

In my case the solution was a forgotten mix() command in the app layout blade file.