Hi,
Plasmic Sync now seems to have removed the logic for generating server queries from each individual page it syncs down, and is now attempting to import a function from files which do not exist / are not being created on sync;
import { executeServerQueries } from "./__loader_rsc_ProjectHtmlImportsHomepage";
We updated the CLI to latest to see if that helps, but it made no difference.
We have implemented a temporary fix by recreating the function based on older versions of the file and regex replacing the repo with the new import, but this issue happens every sync and thus will need to be done every time.
import { executeServerQueries } from "@/lib/plasmic/util/executeServerQueries";
import {
executeServerQuery,
ServerQuery
} from "@plasmicapp/react-web/lib/data-sources";
const $$ = {}
export async function executeServerQueries($ctx: any) {
const $queries: Record<string, any> = {};
const serverQueries: Record<
string,
ServerQuery<(typeof $$)[keyof typeof $$]>
> = {};
do {
await Promise.all(
Object.keys(serverQueries).map(async key => {
$queries[key] = await executeServerQuery(serverQueries[key]);
if (!$queries[key].data?.isUndefinedServerProxy) {
delete serverQueries[key];
}
})
);
} while (
Object.values($queries).some(value => value.data?.isUndefinedServerProxy)
);
return $queries;
}
Thought I’d bring this to your attention, as it doesn’t seem to have been mentioned on the forums at all.
This was not an issue previously, and first occurred for us last week on Jan 8th.