Skip to content

Subscribers not running with Dockerised application #3430

Answered by dahlfrederik
dahlfrederik asked this question in Q&A
Discussion options

You must be logged in to vote

SOLUTION

I figured out a solution to my problem.

When I realized that the Subscriber (and the eventBusService etc) was never initialized let me into the thought process that my project did not handle my TS files correctly.

It turns out that my subscriber and service while written in TS was not transpiled/compiled as expected.

Then I looked into MedusaJS and TypeScript and found a PR that added support for typescript (medusajs/medusa-starter-default#9)

I then decided to read through the changes and add the ones relevant for my project (for now).

I updated my package.json file with a build script:

"scripts": {
"build": "tsc -p tsconfig.json",
"start": "npm run build && medusa develop"
},

I …

Replies: 3 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@dahlfrederik
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@srindom
Comment options

Answer selected by dahlfrederik
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants