DEV Community

korenkaplan
korenkaplan

Posted on

Deployment Crush HELP Please

my app works perfect on development conneting to the mongodb atlas, but when trying to deploy I get an error. After isolation Testing I found out that what's causing the crash is the following line:
imports:[MongooseModule.forFeature([{name:Transaction.name,schema:TransactionSchema}])]. Its not happening on a spesific module its for every module I import the Mongoose module.

Again on development it works fine only on production it fail to deploy. The enviorment variables are set correctly on production and the connection is in the app module:
MongooseModule.forRoot(mongodb+srv://${process.env.MONGO_USER}:${process.env.MONGO_PASSWORD}${process.env.MONGO_PATH},{dbName: process.env.DB_NAME}),

Top comments (0)

Qodo Takeover

Introducing Qodo Gen 1.0: Transform Your Workflow with Agentic AI

Rather than just generating snippets, our agents understand your entire project context, can make decisions, use tools, and carry out tasks autonomously.

Read full post

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay