Hi.
I have an unusual error with ESM imports that I cannot fathom.
I’m building a workflow that would update the most popular posts in Ghost(Pro) using the analytics data from Fathom Analytics.
Three steps of the workflow are Ghost related. In the first step, I fetch current posts with the tag #popular and in that step, my only ESM import is import GhostAdminAPI from '@tryghost/admin-api'. This step works without any glitches.
In the second step, I’m trying to remove the #popular tag from the posts that I got from the previous step. My only ESM import in this step is also import GhostAdminAPI from '@tryghost/admin-api'. However, here I’m getting an error saying 'import' and 'export' may appear only with 'sourceType: module' (1:0)
So, I have the same ESM imports in two steps, in both cases, they are only ESM imports, and in the first step it works, while in the second step, it produces an error.
Has anyone had similar issues? Any help would be appreciated.
Cheers.