1

When I executed the same code

branchSwitch="-b test"   
echo $(sfdx package version create -d force-app --post-install-script PostInstall -x  -w 60 --skip-validation --json $branchSwitch) > createPackageVersion.txt

on my computer, I receive a valid JSON in the file, however, when this code is run on the github action server, it produces the empty JSON file and doesn't return any error message and the package version is not created.

Why there is such behavior and how can I fix it or workaround it?

1 Answer 1

0

Update:

On June 8th 2023, the issue has been fixed by SFDX CLI Team on the 8th of June by changing the library it uses for zip files

https://github.com/forcedotcom/cli/tree/main/releasenotes/sfdx#72046-june-8-2023

FIX: We've fixed a number of issues related to Node.js v18.16.0. If you followed our suggestions for working around the issues, you can now return to the version of Node.js you were using before and update Salesforce CLI to the latest version. (GitHub issue #2125, source-deploy-retrieve PR #975)

https://github.com/forcedotcom/source-deploy-retrieve/pull/975

bug report in upstream node: https://github.com/nodejs/node/issues/48406


Old workaround description and legacy part of the answer:

Opened a github issue for SFDX CLI project

https://github.com/forcedotcom/cli/issues/2092

Looks like there is a problem with NodeJS version 18.16.0

which affects not only SFDX CLI but other NodeJS packages https://github.com/NomicFoundation/hardhat/issues/3877

The workaround and solution to this problem is to downgrade NodeJS to the previous version like following, for example, for Github Actions CI/CD:

- uses: actions/setup-node@v3
  with:
    node-version: 18.15.0

You must log in to answer this question.

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