[Issue] Static content deploy - Type error
Nuranto opened this issue · comments
Preconditions and environment
- Magento version 2.4.7
Steps to reproduce
- Create an empty less file in your theme
- Launch
setup:static-content:deploy --force
Expected result
The error "LESS file is empty" is displayed correctly
Actual result
Magento\Framework\Exception\LocalizedException::__construct(): Argument #1 ($phrase) must be of type Magento\Framework\Phrase, string given, called in /var/www/html/vendor/magento/module-deploy/Service/DeployPackage.php on line 142
Additional information
No response
Release note
No response
Triage and priority
- Severity: S0 - Affects critical data or functionality and leaves users without workaround.
- Severity: S1 - Affects critical data or functionality and forces users to employ a workaround.
- Severity: S2 - Affects non-critical data or functionality and forces users to employ a workaround.
- Severity: S3 - Affects non-critical data or functionality and does not force users to employ a workaround.
- Severity: S4 - Affects aesthetics, professional look and feel, “quality” or “usability”.
Hi @Nuranto. Thank you for your report.
To speed up processing of this issue, make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, Add a comment to the issue:
@magento give me 2.4-develop instance
- upcoming 2.4.x release- For more details, review the Magento Contributor Assistant documentation.
- Add a comment to assign the issue:
@magento I am working on this
- To learn more about issue processing workflow, refer to the Code Contributions.
Join Magento Community Engineering Slack and ask your questions in #github channel.
🕙 You can find the schedule on the Magento Community Calendar page.
📞 The triage of issues happens in the queue order. If you want to speed up the delivery of your contribution, join the Community Contributions Triage session to discuss the appropriate ticket.
Hi @engcom-Delta. Thank you for working on this issue.
In order to make sure that issue has enough information and ready for development, please read and check the following instruction: 👇
- 1. Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).
- 2. Verify that issue has a meaningful description and provides enough information to reproduce the issue.
- 3. Add
Area: XXXXX
label to the ticket, indicating the functional areas it may be related to. - 4. Verify that the issue is reproducible on
2.4-develop
branchDetails
- Add the comment@magento give me 2.4-develop instance
to deploy test instance on Magento infrastructure.
- If the issue is reproducible on2.4-develop
branch, please, add the labelReproduced on 2.4.x
.
- If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and stop verification process here! - 5. Add label
Issue: Confirmed
once verification is complete. - 6. Make sure that automatic system confirms that report has been added to the backlog.
Hi @Nuranto ,
Thanks for reporting and collaboration.
Verified the issue in Magento 2.4 dev instance and 2.4.7 and the issue is not reproducible.
Steps to reproduce:
1.Create an empty less file in your theme
2.Launch setup:static-content:deploy --force
Please refer the attached screenshots, data and let us know if we missed anything.
Created an empty less file in luma theme abc.less
bin/magento setup:static-content:deploy --force , it's ran successfully
Rename _abc.less
to abc.less
, and you should be able to reproduce the issue. (The goal here is just to generate an error during compilation. You can use another method for that if you want. The issue is about an error that happens when an error is displayed)
Hi @Nuranto,
Verified the issue on 2.4-develop, 2.4.7 and it is reproducible.
Hence, Confirming the issue.
Steps to reproduce:-
1.Create an empty less file in your theme
2.Launch setup:static-content:deploy --force
Please refer the attached screenshot.
✅ Jira issue https://jira.corp.adobe.com/browse/AC-11905 is successfully created for this GitHub issue.
✅ Confirmed by @engcom-Delta. Thank you for verifying the issue.
Issue Available: @engcom-Delta, You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself.
seem you need use file less with underscore for solve problem. Magento not allow you import styles without underscore
I'm not sure but seem problem related with php version and lessphp compiler package may not fully compatible with new php
Magento used this one "wikimedia/less.php" for gen styles by php
my less file not empty still giving me same error after upgrading to 2.4.7 in deploy command !!!
any Updates ?