Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Summer '20 force:source:deploy and force:source:retrieve fail for components that use shared CSS LWC #492

Closed
lindsayholmes-gears opened this issue Jul 16, 2020 · 7 comments
Labels
bug Issue or pull request that identifies or fixes a bug

Comments

@lindsayholmes-gears
Copy link

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

@GH4Arlene
Copy link

GH4Arlene commented Jul 21, 2020

Let us know if you need another example. We are seeing the same behavior on force:source:deploy.

Update:
@oclif/plugin-autocomplete 0.1.5 (core)
@oclif/plugin-commands 1.3.0 (core)
@oclif/plugin-help 3.0.1 (core)
@oclif/plugin-not-found 1.2.4 (core)
@oclif/plugin-plugins 1.7.10 (core)
@oclif/plugin-update 1.3.10 (core)
@oclif/plugin-warn-if-update-available 1.7.0 (core)
@oclif/plugin-which 1.0.3 (core)
@salesforce/sfdx-trust 3.0.7 (core)
analytics 1.12.0 (core)
generator 1.1.3 (core)
salesforcedx 49.2.3 (core)
├─ salesforce-alm 49.3.0 (core)
├─ salesforcedx-templates 48.32.0 (core)
├─ custom-metadata 1.0.7 (core)
└─ @salesforce/sfdx-plugin-lwc-test 0.1.7 (core)
sfdx-cli 7.66.2 (core)

@shetzel
Copy link
Contributor

shetzel commented Jul 21, 2020

ERROR running force:source:retrieve: Cannot read property 'fileName' of undefined is definitely a theme with lots of recent issues so we'll get it fixed asap. Thank you!

@shetzel shetzel added the bug Issue or pull request that identifies or fixes a bug label Jul 22, 2020
@saddankiSFDC
Copy link

Is there any ETA on this fix?

@jmleep
Copy link

jmleep commented Sep 11, 2020

Also looking for an ETA on this issue... The only workaround is to deploy the shared CSS component every time you deploy any component that imports it, but you must use the CLI and not the VSCode extensions. It's very frustrating.

@nitinparasa
Copy link

+1 on this. A fix will be much appreciated!

@shetzel
Copy link
Contributor

shetzel commented Sep 21, 2020

This looks the same as #496 and #400. The fix will be in the next patch release.

@mshanemc
Copy link
Contributor

mshanemc commented Dec 6, 2021

#496 and #400 are closed now, so I'm closing this one.

@mshanemc mshanemc closed this as completed Dec 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue or pull request that identifies or fixes a bug
Projects
None yet
Development

No branches or pull requests

8 participants