7

Getting a strange error while running the sfdx force:source:push command for an lwc component

enter image description here

PROJECT PATH ERROR ──────────── ───────────────────────────────────────────────── N/A TypeError: LWC1009: decl.moveTo is not a function

1 Answer 1

12

I found the issue. The cause is a css file I have in a Lightning Web Component bundle. I had two declarations for the same selector in my css

.slds-card {
    border: 1px #CFD7E6 solid !important;
    border-radius: 5px !important;
    background-color: #9298eb !important;
}

.slds-card {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
}

Merging them into one solved my issue.

.slds-card {
    border: 1px #CFD7E6 solid !important;
    border-radius: 5px !important;
    background-color: #9298eb !important;
    padding-left: 1rem !important;
    padding-right: 1rem !important;
}

I wonder if this should be logged as a bug in sfdx ??

2
  • 4
    I'd say log a bug. Worse case scenario, they close the bug, but if it's reproducible, they'll likely fix it, or at least document it as a limitation.
    – sfdcfox
    Apr 6, 2019 at 0:45
  • Yeah please log a bug if you have time. The description of the error is not helpful at all. And you should be able to push an LWC component with the same selector in the css.
    – Kenan
    Apr 6, 2019 at 5:49

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .