Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'unified'

Trying to use unifiedjs in a workflow and getting the following error

Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'unified' imported from /tmp/src/runBlockHandler.js (line 159)
async function main() {
  const { unified }     = await import("unified");
  const remarkParse     = (await import("remark-parse")).default;
  const remarkGfm       = (await import("remark-gfm")).default;
  const remarkDirective = (await import("remark-directive")).default;

All of my other imports work without issue.

the unified library is ESM only (import), while some libraries will be able to load the way you're getting around this, I think it's dependencies are going to keep you from loading this.

You could try a different version. I looked around for you and found v 7.0.0 is commonjs, but there might be a newer one also (I got lucky, I'm not sure what version they switched from cjs to esm, so maybe v 8.0.0 or 9.0.0 might be cjs also)

to change the version I just modify the package.json file: