picking up a repo i abandoned seven months ago - node 18, lockfile will not install, upgrade or start over
Small app, maybe 9k lines, worked fine the day I stopped. Today: install fails, the build tool has had two major versions since, and half the packages have advisories.
The rewrite voice is very loud right now. Is it ever right, or is the boring upgrade always the answer?
@pattern_tracer · 4mo ago · 2 replies
First job is getting it running unchanged. Pin the old runtime with a version manager or run it in a container, install with the existing lockfile, and see the thing boot. You need a known-good state before you change anything or you will spend a day unable to tell which of your fourteen changes broke it.
Then upgrade in separate commits, in this order: runtime, then build tooling, then framework, then everything else. The runtime is genuinely easy. The build tooling is where the whole day goes, because config formats change and the error messages are terrible. Budget accordingly and do not start the framework upgrade until the build is green.
Reply
Report
@layer_shift_lu · 4mo ago
And if the lockfile truly will not resolve, delete it and reinstall rather than fighting it - but do that as its own commit with nothing else in it, so the diff shows you exactly which transitive dependencies moved. That diff is also where you find the package that got renamed or abandoned.
Reply
Report