Home  >  Q&A  >  body text

Mix manifest not found on Laravel 9 - vite

I have a problem when I run npm run build and it says the mixin manifest cannot be found. This happens when I run in production.

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

Has anyone encountered this problem?

I've tried any suggestions for updating npm and still get this error.

P粉974462439P粉974462439313 days ago459

reply all(1)I'll reply

  • P粉451614834

    P粉4516148342023-12-12 10:14:56

    Try running npm install && npm run build.

    If you are using Laravel Forge, you can edit the deployment script like this:

    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

    reply
    0
  • Cancelreply