function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
jasondoddsjasondodds 

Issue deploying static resources with DX

I have a package I pulled down using sfdx force:mdapi:retrieve which I then converted to DX structure using the force:mdapi:convert command.  One thing that happens during convert is that all the Static Resources in my package that were a .zip archive are then decompressed and shown in a folder structure under staticresources in the DX folder structure.  My issue comes when I am trying to do a deploy of DX source code back into the packaging org (not a scratch org) using force:source:convert and then force:mdapi:deploy, I get the following message for one or more of the static resources in the package:

The specified Static Resource is not a valid zip file

I am assuming the convert from DX to mdapi should zip all of the files in the DX folder for the static resource, but it looks like something is going wrong.  Has anyone else run into this error before?

SudhakarChSudhakarCh
Hi jasondodds,
I am also facing the same issue, Did you find a solution for the above problem.
Thanks,
Sudhakar
SudhakarChSudhakarCh
Hi jasondodds,

I have downloaded the static resource from my source org (It is in .resource format) and kept in Static resources folder of SFDX folder structure and it worked for me.

Thanks,
Sudhakar