Skip to content

[BUG] server/package.json is invalid JSON (merge conflict), so npm install fails in server/ #516

@Anexus5919

Description

@Anexus5919

Summary

server/package.json is not valid JSON. Its dependencies block contains leftover merge conflict artifacts: a missing comma plus duplicate keys. As a result, cd server && npm install fails and backend dependencies cannot be installed.

Details

Inside dependencies:

  1. There is no comma after "pdf-lib": "^1.17.1" (line 25), so the JSON is malformed.
  2. mongoose appears twice (both ^8.17.0).
  3. multer appears twice with conflicting versions: ^2.1.1 and ^1.4.5-lts.1.

This block is the result of two dependency lists being merged without resolving the conflict.

Steps to reproduce

  1. From the repo root, run node -e "require('./server/package.json')".
  2. Observe:
Expected ',' or '}' after property value in JSON at position 572 (line 27 column 5)

Or run cd server && npm install and observe it fails to parse package.json.

Expected

server/package.json is valid JSON and cd server && npm install installs the backend dependencies.

Actual

server/package.json fails to parse, so npm install cannot run.

Suggested fix

Resolve the conflict into a single valid dependencies block:

  • Keep one mongoose entry.
  • Keep multer at ^2.1.1 (the current maintained major; server/package-lock.json already resolves multer to 2.1.1).
  • Keep the dependencies required by the backend that are only present in the second block: pdf-parse (used by server/utils/parser.js), mammoth (used by server/utils/parser.js), and openai (used by server/index.js).
  • Add the missing comma.

After the fix, cd server && npm install should succeed and the lockfile should be regenerated to include the previously missing dependencies.

Notes

This is the second half of the same recent bad merge. The backend entry point server/index.js was also left with merge artifacts, reported separately in #515. Both are required for the backend to install and start.

I would like to work on this issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions