I'm trying to deploy an sfdx project to my production org, and this is my first attempt to not use the 'convert to traditional packages with mdapi' route.
I created my sfdx project via cli, pulled metadata from production using mdapi, converted it, pushed to a scratch, made changes in scratch, pulled changes back into project, tested everything... and now I'm ready to deploy:
sfdx force:package:Create --name "emailStatusUpdate" --packagetype Unlocked --path ./
[RESPONSE]: Successfully created a package. 0Ho360000004CAkCAM
To deploy (ie 'install') the package with
force:package:install I need to create a version of the package first:
sfdx force:package:version:create --package "emailStatusUpdate" -d ./ -x
[RESPONSE]: Unexpected file found in package directory: P:\emailStatus\sfdx-project.json.
Why is that file unexpected? Hell, it's the only thing that was changed by my package creation command. No files were added, no packages created in my Production org (set as dev hub).. only my sfdx-project.json was updated with the package details.
And when I try to create a second package for the same project in a new directory, things start getting screwy:
PS P:\emailStatus> sfdx force:package:create --name "test3" --packagetype unlocked --path P:/testdir ERROR: Maximum call stack size exceeded. PS P:\emailStatus> sfdx force:package:create --name "test3" --packagetype unlocked --path P:/testdir ERROR: The package name must be unique for the namespace.
No 'testdir' was created, nor was the sfdx-project.json updated with the new package info... and yet:
PS P:\emailStatus> sfdx force:package:list === Packages  NAMESPACE PREFIX NAME ID ALIAS DESCRIPTION TYPE ──────────────── ────────────────────── ────────────────── ───────────────── ──────────────────────── ──────── emailStatusUpdate 0Ho360000004CAkCAM emailStatusUpdate Case Email Status Update Unlocked emailStatusUpdateTest2 0Ho360000004CApCAM Case Email Status Update Unlocked test3 0Ho360000004CAuCAM Unlocked
Anyone know what I'm missing to successfully deploy? Having a real difficult time finding resources that walk you through this process.