Composer scripts output not being saved
See original GitHub issueBug report
- Version: vercel-php@0.3.1
- URL: https://phase-blog-demo-git-v050-upgrade.reedjones.now.sh/
- Repository: https://github.com/reed-jones/phase-blog-demo/pull/7
Description
Composer scripts run perfectly (thanks!)
"vercel": [
"npm install",
"npm run prod"
]
However the build output (js/css) isn’t available after the build is complete. If it helps, I’m using laravel mix
21:03:07.975 | > cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --no-progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js
21:03:20.083 | DONE Compiled successfully in 10120ms3:03:20 AM
21:03:20.087 | Asset Size Chunks Chunk Names
21:03:20.087 | /css/app.css 8.47 KiB 1 [emitted] /js/app-server
21:03:20.087 | /js/app-client.js 169 KiB 0 [emitted] /js/app-client
21:03:20.087 | /js/app-client.js.LICENSE.txt 219 bytes [emitted]
21:03:20.087 | /js/app-server.js 326 KiB 1 [emitted] [big] /js/app-server
21:03:20.087 | /js/app-server.js.LICENSE.txt 219 bytes [emitted]
21:03:20.157 | 🐘 Running composer scripts [DONE]
21:03:28.993 | 🐘 Creating lambda
21:03:36.877 | Uploading build outputs...
21:03:40.526 | Build completed. Populating build cache...
21:03:48.266 | Uploading build cache [26.75 MB]...
21:03:48.921 | Build cache uploaded: 662.765ms
21:03:48.931 | Done with "api/index.php"
(apologies for the formatting on that)
however /css/app.css
and /js/app-client.js
return 404’s when the site is loaded (website if I run npm run prod
locally and commit the output to git: https://phase-blog-demo.now.sh/)
Issue Analytics
- State:
- Created 3 years ago
- Comments:7
Top Results From Across the Web
PHP Composer scripts don't fire - Stack Overflow
The ComposerScripts methods work if I test them with composer run-script and the test.sh script works fine, but when I install or update...
Read more >Command-line interface / Commands - Composer
--no-scripts: Skips execution of scripts defined in composer.json . --no-cache: Disables the use of ... There is also an init command available to...
Read more >DataWeave Scripts - MuleSoft Documentation
If the mime types of the inputs differ, and no output is specified, the script throws an exception so that you know to...
Read more >Composer — DeepStream 6.1.1 Release documentation
The Composer is an GUI application designed to create AI Application ... Be sure the component list is not empty before opening any...
Read more >How to build and distribute beautiful command-line ...
Run the following command to create a composer.json file interactively: ... Once the script is done, you should see the dependency listed in ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I placed it to readme. Thanks for the issue.
Hmm, I think I know where is the catch. Files created in build phase (during call
composer run vercel
) are not accessible from browser/routing/routes.I solved it with little trick in satis example.
https://github.com/juicyfx/vercel-examples/blob/d615f48830491e54afba30d0e54f402a6e6ccc0e/php-satis/index.php#L3-L9
I am in touch with Vercel team. For now, test please this approach.