Summary
I created a CSS-only LWC to share CSS among multiple LWCs. As soon as other LWCs include the code to import the shared CSS, they can no longer be deployed to or retrieved from the org using the CLI (I've used Workbench as a workaround). The message received reads:
ERROR running force:source:retrieve: Cannot read property 'fileName' of undefined
Steps To Reproduce:
Repository to reproduce: dreamhouse-lwc
Files created in repository sharedCssBug
To reproduce, follow steps in release notes exactly.
Expected result
One should successfully be able to retrieve and deploy myComponent using force:source:deploy and force:source:retrieve.
Actual result
When running force:source:retrieve, the following error message is received:
ERROR running force:source:retrieve: Cannot read property 'fileName' of undefined
Results from --loglevel trace: retrieveTrace.txt
Results from --dev-debug: retrieveDebug.txt
When running force:source:deploy, the following error message is received:
No MODULE named markup://c:cssLibrary found : [markup://c:myComponent]
Results from --loglevel trace: deployTrace.txt
Results from --dev-debug: deployDebug.txt
NOTE: the attached text documents with debug/trace results are from my org where I initially experienced the problem, so the names of components don't match up to the samples. All the trace/debug docs can also be found in the linked repository above.
Additional information
SFDX CLI Version: sfdx-cli/7.65.6-23e8b7f47e win32-x64 node-v12.13.0
SFDX plugin Version: salesforcedx 48.22.11 (core)
@oclif/plugin-autocomplete 0.1.5 (core)
@oclif/plugin-commands 1.3.0 (core)
@oclif/plugin-not-found 1.2.4 (core)
@oclif/plugin-plugins 1.7.10 (core)
@oclif/plugin-warn-if-update-available 1.7.0 (core)
@oclif/plugin-which 1.0.3 (core)
@salesforce/lwc-dev-server 2.4.0
├─ @oclif/plugin-help 2.2.3
└─ @oclif/plugin-update 1.3.9
@salesforce/sfdx-diff 0.0.6
@salesforce/sfdx-trust 3.0.7 (core)
analytics 1.12.0 (core)
generator 1.1.3 (core)
salesforcedx 48.22.11 (core)
├─ salesforce-alm 48.24.3 (core)
├─ salesforcedx-templates 48.18.0 (core)
├─ custom-metadata 1.0.4 (core)
└─ @salesforce/sfdx-plugin-lwc-test 0.1.7 (core)
sfdx-cli 7.65.6 (core)
OS and version: Windows 10 Business
Summary
I created a CSS-only LWC to share CSS among multiple LWCs. As soon as other LWCs include the code to import the shared CSS, they can no longer be deployed to or retrieved from the org using the CLI (I've used Workbench as a workaround). The message received reads:
Steps To Reproduce:
Repository to reproduce: dreamhouse-lwc
Files created in repository sharedCssBug
To reproduce, follow steps in release notes exactly.
Expected result
One should successfully be able to retrieve and deploy myComponent using force:source:deploy and force:source:retrieve.
Actual result
When running force:source:retrieve, the following error message is received:
Results from --loglevel trace: retrieveTrace.txt
Results from --dev-debug: retrieveDebug.txt
When running force:source:deploy, the following error message is received:
Results from --loglevel trace: deployTrace.txt
Results from --dev-debug: deployDebug.txt
NOTE: the attached text documents with debug/trace results are from my org where I initially experienced the problem, so the names of components don't match up to the samples. All the trace/debug docs can also be found in the linked repository above.
Additional information
SFDX CLI Version: sfdx-cli/7.65.6-23e8b7f47e win32-x64 node-v12.13.0
SFDX plugin Version: salesforcedx 48.22.11 (core)
@oclif/plugin-autocomplete 0.1.5 (core)
@oclif/plugin-commands 1.3.0 (core)
@oclif/plugin-not-found 1.2.4 (core)
@oclif/plugin-plugins 1.7.10 (core)
@oclif/plugin-warn-if-update-available 1.7.0 (core)
@oclif/plugin-which 1.0.3 (core)
@salesforce/lwc-dev-server 2.4.0
├─ @oclif/plugin-help 2.2.3
└─ @oclif/plugin-update 1.3.9
@salesforce/sfdx-diff 0.0.6
@salesforce/sfdx-trust 3.0.7 (core)
analytics 1.12.0 (core)
generator 1.1.3 (core)
salesforcedx 48.22.11 (core)
├─ salesforce-alm 48.24.3 (core)
├─ salesforcedx-templates 48.18.0 (core)
├─ custom-metadata 1.0.4 (core)
└─ @salesforce/sfdx-plugin-lwc-test 0.1.7 (core)
sfdx-cli 7.65.6 (core)
OS and version: Windows 10 Business