First off, unless your EC2 instance can compile production files on the fly like Heroku, you need to commit your file to the repo. For instance, I commit the dev compiled files during development. When I am ready to go to production, I run the production flag and test. After it checks out, I commit to repo and deploy. You can do it that way, or use Envoy to make everything work for you in a script file.
Mar 6, 2017
1
Level 2
Laravel mix don't write file in production.
I write here even if I'm referring to Laravel Mix, but I cannot find a "Mix" channel. I'm trying to put a little Laravel application working on an EC2 instance. I pulled the source code from git, composer install, npm install and all was fine. The problem is when I run npm run production (or npm run dev) I see script compilation in progress, but in the end no files are written to public, and no errors is displayed.
Try to add ubuntu to www-data group and also to run npm with sudo, but no luck.
If I put in production my compiled js and css files from my local machine, all works fine, but I don't think this is a good practice.
Any idea?
Thank you
Please or to participate in this conversation.