-
Notifications
You must be signed in to change notification settings - Fork 78
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
sfdx force:source:deploy --manifest ERROR: Cannot read property 'getMetadataName' of undefined. #16
Comments
I'll just add that perhaps the easiest and best solution is to just add to that Warning, some help message like "Your source is missing components referenced in your Package.xml file. Try using I think a more important issue is the sfdx does not intelligently handle things like flows well, whereas tools like force-cli and solenopsis determine how to only deploy missing / inactive flows. |
Why is there different behaviour when retrieving vs. deploying from the same package.xml? My (maybe naive) expectation is that if I have a component in my package.xml
|
@JimBTek Thank you for the feedback, we are tracking this bug in our internal system. Our internal work item is W-5749751, and I have it on our backlog for the summer release. I'll leave this ticket open till we fix it. |
Interesting thing I found: a typo in your deploy command can produce this error too.
Note the extra "T" before "Component". This productes the same error described in the original post. Fixing the metadata name makes the command work. Just commenting in case someone else has this same issue because of a silly typo. :) |
This issue has been linked to a new work item: W-9297987 |
Summary
It seems like if your pacakge.xml has any metadata components listed that do not exist in your force-app, that it fails.
Steps To Reproduce:
sfdx force:source:retrieve -- manifest
in VS Code pull source from Org with a Package.xml filesfdx force:source:deploy --manifest /manifest/package.xml
with the VS code right clickget the error
ERROR: Cannot read property 'getMetadataName' of undefined.
Expected result
unless you have undeployable metadata components in your package.xml, you should be able to use the same package.xml to both source:retrieve and source:deploy
Actual result
If mtetadata defined in your package.xml returns no files, then that folder is not created in force-app. then when you try to deploy you get
ERROR: Cannot read property 'getMetadataName' of undefined.
Additional information
VSCode output window:
VS Code Version:
OSX Version 1.26.1 (1.26.1)
SFDX CLI Version:
sfdx-cli/6.29.0 (darwin-x64) node-v8.11.2
OS and version:
OSX 10.12.6
The text was updated successfully, but these errors were encountered: