Skip to content

fix: move mongoose from devDependencies to dependencies in root package.json (#28)#53

Open
adhacks541 wants to merge 2 commits into
Ashmita1206:mainfrom
adhacks541:fix-mongoose-dependency
Open

fix: move mongoose from devDependencies to dependencies in root package.json (#28)#53
adhacks541 wants to merge 2 commits into
Ashmita1206:mainfrom
adhacks541:fix-mongoose-dependency

Conversation

@adhacks541

Copy link
Copy Markdown

Description

This pull request addresses issue #28 where mongoose was listed under devDependencies in the root package.json file.

Problem

In the root package.json, mongoose was listed under devDependencies. When deploying to production using standard production-pruned installs (such as npm install --production), devDependencies are excluded. Since mongoose is a core runtime dependency, this exclusion causes a Cannot find module 'mongoose' runtime crash upon application startup.

Solution

  • Moved mongoose from devDependencies to dependencies in the root package.json file.
  • Ran npm install to update package-lock.json and ensure that mongoose and its sub-dependencies are correctly unflagged from development-only scope.
  • Verified that all server-side dependencies are correctly categorized in server/package.json.

Closes #28

Moves mongoose from root devDependencies to dependencies to ensure robust production server deployments and prevent crash on startup due to missing module.
Copilot AI review requested due to automatic review settings May 31, 2026 05:32
@vercel

vercel Bot commented May 31, 2026

Copy link
Copy Markdown

@adhacks541 is attempting to deploy a commit to the anglenobida003-8112's projects Team on Vercel.

A member of the Team first needs to authorize it.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Moves mongoose from devDependencies to dependencies in the root package.json, since it is required at runtime.

Changes:

  • Added a new dependencies section containing mongoose.
  • Removed mongoose from devDependencies.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@adhacks541

Copy link
Copy Markdown
Author

Hi @Ashmita1206 , I’ve resolved the merge conflict and updated the PR for Issue #28. The fix moves mongoose to dependencies so production deployments don't encounter runtime module errors.

This contribution is part of my GSSoC'26 participation. Could you please review it when convenient? I'd be happy to address any feedback. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

mongoose incorrectly placed in devDependencies — will cause production server crash

2 participants