Problem
scripts/audit-competition-logos.mjs (added in #226's follow-up work) does:
import { readFileSync, readdirSync } from "node:fs";
import sharp from "sharp";
but sharp is not listed anywhere in package.json (dependencies or devDependencies):
$ grep -n '"sharp"' package.json
# (no output)
$ npm ls sharp
studymap@2.4.0 /path/to/StudyMap
├─┬ @vercel/og@1.0.1
│ └── sharp@0.35.3
└─┬ next@16.2.9
└── sharp@0.34.5
The script only works today because sharp happens to be a transitive dependency of @vercel/og and next, and npm's hoisting happens to put a copy where a top-level import sharp can find it. That's not a guarantee — a lockfile change, a different package manager (pnpm doesn't hoist transitive deps by default), or a future version bump of @vercel/og/next that stops depending on sharp (or changes its version) would silently break this script with a confusing Cannot find module 'sharp' or a version mismatch, with nothing in package.json documenting that the script needs it.
Fix
Add sharp as an explicit devDependency in package.json (it's a dev/audit tool, not part of the shipped app) at a version compatible with what's already resolved, and re-run npm install to update the lockfile.
Acceptance criteria
Problem
scripts/audit-competition-logos.mjs(added in #226's follow-up work) does:but
sharpis not listed anywhere inpackage.json(dependenciesordevDependencies):The script only works today because
sharphappens to be a transitive dependency of@vercel/ogandnext, and npm's hoisting happens to put a copy where a top-levelimport sharpcan find it. That's not a guarantee — a lockfile change, a different package manager (pnpm doesn't hoist transitive deps by default), or a future version bump of@vercel/og/nextthat stops depending onsharp(or changes its version) would silently break this script with a confusingCannot find module 'sharp'or a version mismatch, with nothing inpackage.jsondocumenting that the script needs it.Fix
Add
sharpas an explicitdevDependencyinpackage.json(it's a dev/audit tool, not part of the shipped app) at a version compatible with what's already resolved, and re-runnpm installto update the lockfile.Acceptance criteria
sharpis declared inpackage.jsonnode scripts/audit-competition-logos.mjsstill runs correctly after a cleannpm ci