Ubuntu 24.04 LTS
PostgreSQL 17
Node.js v22.18.0
Medusa 2.9.0
https://docs.medusajs.com/resources/infrastructure-modules/analytics/posthog
I created the "src/workflows/track order created. ts" and "src/subscribers/order place. ts" files according to the tutorial, but when running yarn dev, I received the following error message:
///
woo@wooawesome:~/medusa$ yarn dev
{"level":"info","message":"Watching filesystem to reload dev server on file change","timestamp":"2025-08-20 08:39:05"}
info: Skipping instrumentation registration. No register function found.
info: Connection to Redis in module 'event-bus-redis' established
info: Connection to Redis in module 'cache-redis' established
info: Connection to Redis in "locking-redis" provider established
info: Connection to Redis in module 'workflow-engine-redis' established
info: Connection to Redis PubSub in module 'workflow-engine-redis' established
error: Error starting server
error: useQueryGraphStep is not defined
ReferenceError: useQueryGraphStep is not defined
at Object.<anonymous> (/home/woo/medusa/src/workflows/track-order-created.ts:41:30)
at createWorkflow (/home/woo/medusa/node_modules/@medusajs/workflows-sdk/src/utils/composer/create-workflow.ts:150:33)
at Object.<anonymous> (/home/woo/medusa/src/workflows/track-order-created.ts:38:56)
at Module._compile (node:internal/modules/cjs/loader:1688:14)
at Module.m._compile (/home/woo/medusa/node_modules/ts-node/src/index.ts:1618:23)
at node:internal/modules/cjs/loader:1820:10
at Object.require.extensions.<computed> [as .ts] (/home/woo/medusa/node_modules/ts-node/src/index.ts:1621:12)
at Module.load (node:internal/modules/cjs/loader:1423:32)
at Function._load (node:internal/modules/cjs/loader:1246:12)
at TracingChannel.traceSync (node:diagnostics_channel:322:14)
///