NX monorepo - payload is undefined #545
-
Hi TypeError: Cannot read properties of undefined (reading 'init') Reproducing the problem:
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hey @ShakedHad, I reproduced the problem you had and was able to get further in the setup by changing the tsconfig.app.json the to have two more settings in the
Mine still isn't starting so there is one more thing to finish out. The last thing will be to make sure that your payload.config.js is included in the dist. You might have to add to the tsconfig to make that transpile from .ts and then adding to your "start" script the path. Something like this should get you there after you make sure the payload.config.js is written to dist: Hope that gets you closer and gives you an idea of what to fix. If you are still struggling, let us know! |
Beta Was this translation helpful? Give feedback.
Hey @ShakedHad,
I reproduced the problem you had and was able to get further in the setup by changing the tsconfig.app.json the to have two more settings in the
compilerOptions
, they are "esModuleInterop" set to true and strict set to false.With those changes my
tsconfig.app.json
is:Mine still isn't starting so there is one more thing to finish out. The last thing will be to make sure that yo…