5

I'm a bit lost on how to transition from our managed package structure to Salesforce DX and Packaging 2.

We want to get our existing metadata into Salesforce DX structure to create our VCS repository and start creating scratch orgs as needed but have been unable to.

We've enabled the Dev Hub and Packaging 2 (beta) in our Business Org, we've created a Salesforce DX Project and we want to retrieve source from our existing managed package but when we issue the command sfdx force:mdapi:retrieve -s -r ./mdapipkg -u <username> -p <package name> we get some errors.

If we use the business org username for <username> with the packaging org package name, we get:

ERROR: The metadata retrieve operation failed: INVALID_CROSS_REFERENCE_KEY: No package named 'PACKAGE_NAME' found.

If we use the packaging org username for <username> with the packaging org package name, we get:

ERROR: No org configuration found for name username@packaging.org.

We would really appreciate if someone could guide or point us in the right direction for this transition.

  • Have you authenticated your developer org? I would check out this blog post – Zack Walton Feb 5 '18 at 21:03
  • I don't think so, thank you @ZackWalton, I'll go over the blog. – Jose Feb 5 '18 at 21:07
  • Let me know if you still have issues. – Zack Walton Feb 5 '18 at 22:07
  • Hi @ZackWalton, I was missing the authentication into the packaging (dev) org. I was going over the blog steps and in step 1.9 sfdx force:source:push I get ERROR: Maximum size of request reached. Maximum size of request is 52428800 bytes. I guess my package is too big to push it, is there something I can do here? – Jose Feb 5 '18 at 22:14
  • 1
    Yeah, I'll do that. Please post your comment as an answer so I can accept it. – Jose Feb 5 '18 at 22:27
3

You need to authenticate your developer org before trying to retrieve. Follow this blog post for a good tutorial.

To authenticate your dev org just use the web based flow using:

sfdx force:auth:web:login -a mydevorg

Which will pop up the browser where you can log into the dev org.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.