Installing PHP and Node in a single Docker container helped me.
Docker Image with Wayfinder
I'm trying to create a Docker image using the latest Laravel version with the starter kit React + Laravel's built-in authentication + Pest.
My image has 3 stages. The first building assets, the second running composer install, and the last one building the app.
I know Wayfinder needs PHP to run scripts, but I don't get why I need to install PHP's dev libraries.
RUN composer install --no-dev --optimize-autoloader --no-scripts works fine, but I expect RUN composer install --optimize-autoloader --no-scripts to work as well, given Wayfinder is part of the composer.json required libraries.
The error below happens when I run bun run build
0.835 [@laravel/vite-plugin-wayfinder] [plugin @laravel/vite-plugin-wayfinder] Error generating types: Error: Command failed: php artisan wayfinder:generate --with-form
0.835 at getRollupError (/app/node_modules/rollup/dist/es/shared/parseAst.js:401:45)
0.835 at error (/app/node_modules/rollup/dist/es/shared/parseAst.js:397:42)
0.835 at <anonymous> (/app/node_modules/@laravel/vite-plugin-wayfinder/dist/index.mjs:2101:15)
0.835 at processTicksAndRejections (native:7:39)
0.840 error: script "build" exited with code 1```
Please or to participate in this conversation.