Failing due to Monogodb
codehelp-website
HOBBYOP

a month ago

@repo/web build: MongoPoolClearedError: Connection pool for ac-sy1pyce-shard-00-02.mrii9as.mongodb.net:27017 was cleared because another operation failed with: "Cannot destructure property 'subject' from null or undefined value"

@repo/web build: at processTicksAndRejections (null) {

@repo/web build: errorLabelSet: [Set],

@repo/web build: beforeHandshake: false,

@repo/web build: address: 'ac-sy1pyce-shard-00-02.mrii9as.mongodb.net:27017',

@repo/web build: digest: '170278372',

@repo/web build: [cause]: MongoNetworkError: Cannot destructure property 'subject' from null or undefined value

@repo/web build: at emitErrorNT (internal:streams/destroy:88:12)

@repo/web build: at emitErrorCloseNT (internal:streams/destroy:69:14)

@repo/web build: at processTicksAndRejections (null) {

@repo/web build: errorLabelSet: Set(1) { 'ResetPool' },

@repo/web build: beforeHandshake: false,

@repo/web build: connectionGeneration: 24,

@repo/web build: digest: '3131826827',

@repo/web build: [cause]: TypeError: Cannot destructure property 'subject' from null or undefined value

@repo/web build: at ignore-listed frames

@repo/web build: }

@repo/web build: }

$10 Bounty

2 Replies

Is your code is connecting to MongoDB during the build step? something like await client.connect() ?


lu4p
FREETop 10% Contributor

a month ago

You cannot connect to your database during build. Use a pre deploy command if you want to interact with your database before deploying.

https://docs.railway.com/deployments/pre-deploy-command


Loading...