Error on Deployment: No such file for FilamentAsset

I have this in my AppServiceProvider's boot method:

  FilamentAsset::register([
            Js::make('jsConfetti', 'node_modules/js-confetti/dist/js-confetti.min.js')->loadedOnRequest(),
        ]);


and I have this in my package.json:

 "dependencies": {
        "dragula": "^3.7.3",
        "js-confetti": "^0.12.0",
        "puppeteer": "^21.3.8"
    }


My deployment is failing in the @php artisan Filament::updgrade composer script:

copy(node_modules/js-confetti/dist/js-confetti.min.js): Failed to open stream: No such file or directory

This is with Laravel Forge.

What am I doing wrong, or what do I need to change in order for this to work? Perhaps I need to run
npm install
on my server?
Was this page helpful?