News for hackers. Stuff that matters.
Re:The tragedy of running an old Node project by Klonoar on Monday November 18, 2024 @01:35PM (#42175423)
You know, I ran into something similar recently with a static site engine (Zola). Was moving to a new host and figured I'd just copy and run the binary, only to have it fail due to linking OpenSSL. I had customized the internals years ago and stupidly never committed it anywhere, and attempting to build it fresh ran into issues with yanked crates.

Since it's just a binary though, I wound up grabbing the OpenSSL from the old box and patching the binary to just point to that instead. Thing runs fine after that.

This is all, of course, still totally stupid - but I did find myself thinking how much worse comparable events in JS have been for me over the years. What would have been easily an entire afternoon ended up taking 15 minutes - and a chunk of that was just double checking commands I'd long forgotten.

Re:The tragedy of running an old Node project by kaptainscarlet on Monday November 18, 2024 @01:55PM (#42175642)
That is nothing..Try building your Android project after leaving it idle for a week. Or better yet, try building you react native project you left for 2 days.
Re:The tragedy of running an old Node project by 91bananas on Monday November 18, 2024 @02:00PM (#42175701)
OMG I feel this in my soul. Try looking at one of the gradle files wrong in a kotlin multiplatform app with shared ui.
Re:The tragedy of running an old Node project by abdisalan on Monday November 18, 2024 @01:42PM (#42175501)
Hold on, you had to do binary surgery using an OpenSSL version from an old box you had? I salute the dedication.
Re:The tragedy of running an old Node project by getcrunk on Monday November 18, 2024 @01:48PM (#42175562)
How exactly does one do that. Sounds exciting!
Re:The tragedy of running an old Node project by kaptainscarlet on Monday November 18, 2024 @01:56PM (#42175654)
I think you copy the library file and add it to you load path
Re:The tragedy of running an old Node project by exe34 on Monday November 18, 2024 @02:16PM (#42175851)
patchelf
Re:The tragedy of running an old Node project by ian-g on Monday November 18, 2024 @02:38PM (#42176075)
but don't forget to make sure your new path is fewer characters than the original one so you don't overwrite any of the library
Re:The tragedy of running an old Node project by pavel_lishin on Monday November 18, 2024 @04:44PM (#42177438)
A sewing needle, a spare magnet, and a very steady hand.
Re:The tragedy of running an old Node project by wink on Tuesday November 19, 2024 @07:00AM (#42182495)
Not the OP but what sometimes works is as easy as:

``` ldd your-binary ``` on the old host and then copy all the thing that is referenced, put into ./foo and then start like so on new host: `LD_LIBRARY_PATH=./foo ./your-binary`. (may include typos, from memory)

A great tool for this used to be https://github.com/intoli/exodus - not sure if it still works.

Disclaimer: Also please don't do this with network-facing services, security applies, etc.pp. but it's a good trick to know.

Re:The tragedy of running an old Node project by Izkata on Tuesday November 19, 2024 @11:20AM (#42185145)
I used it for something early this year, it was working then.
Re:The tragedy of running an old Node project by marcosdumay on Tuesday November 19, 2024 @10:55AM (#42184842)
Looks to me he just copied a shared library and changed the search path.

Also, if it was statically linked, he wouldn't have that one problem. (Could have others, but not that one.)

Re:The tragedy of running an old Node project by ikawe on Monday November 18, 2024 @01:50PM (#42175582)
What’s the issue with yanked crates? It should still build from your lockfile, even if it contains yanked crates.
Re:The tragedy of running an old Node project by swiftcoder on Tuesday November 19, 2024 @03:24AM (#42181118)
Assuming you actually committed the lockfile...
Re:The tragedy of running an old Node project by mst on Tuesday November 19, 2024 @04:26AM (#42181489)
Never underestimate the potential of past-you to have accidentally missed a tiny but essential step in a way that won't have made a noticeable difference at the time, yeah.
Re:The tragedy of running an old Node project by vulcan01 on Tuesday November 19, 2024 @08:33AM (#42183233)
This is why Nix (with flakes), in a git repository, will refuse to use a lockfile that isn't being tracked by git.
Re:The tragedy of running an old Node project by pornel on Tuesday November 19, 2024 @09:49AM (#42184002)
Nix also breaks if you try to update it, and you'll eventually have to update for security issues.

I'm stuck with a defunct Nix project I can't update, because crane and fenix flakes made breaking changes, and nix is giving me incomprehensible errors. I've spent enough time googling the errors that I'd be quicker to start over with a nix-less VM.

Re:The tragedy of running an old Node project by mst on Wednesday November 20, 2024 @06:32AM (#42192895)
Yes, that's an excellent idea, and will free up time to deal with the *other* stupid mistakes past-me made :D
Re:The tragedy of running an old Node project by swiftcoder on Wednesday November 20, 2024 @05:05AM (#42192391)
I think the other foot-gun here is that the official recommendation is that library crates not check-in their lockfile (I assume because that prevents downstream crates from freely taking updates to common dependencies).

This has the unfortunate side-effect that while downstream apps might still build, the library itself (and any examples in the library repo) may not compile after some time...