leafac / kill-the-newsletter

Convert email newsletters into Atom feeds
https://kill-the-newsletter.com
MIT License
2.5k stars 118 forks source link

Unable to migrate on ubuntu 20.04 #108

Open Ovler-Young opened 3 weeks ago

Ovler-Young commented 3 weeks ago

OS: Ubuntu 20.04 x86_64

Using version 2.0.1 to migrate:

log:

node:internal/modules/cjs/loader:1602
  return process.dlopen(module, path.toNamespacedPath(filename));
                 ^

Error: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.33' not found (required by /root/kill-the-newsletter/kill-the-newsletter/_/node_modules/better-sqlite3/build/Release/better_sqlite3.node)
    at Module._extensions..node (node:internal/modules/cjs/loader:1602:18)
    at Module.load (node:internal/modules/cjs/loader:1287:32)
    at Module._load (node:internal/modules/cjs/loader:1103:12)
    at Module.require (node:internal/modules/cjs/loader:1310:19)
    at require (node:internal/modules/helpers:179:18)
    at bindings (/root/kill-the-newsletter/kill-the-newsletter/_/node_modules/bindings/bindings.js:112:48)
    at new Database (/root/kill-the-newsletter/kill-the-newsletter/_/node_modules/better-sqlite3/lib/database.js:48:64)
    at new Database (file:///root/kill-the-newsletter/kill-the-newsletter/_/node_modules/@radically-straightforward/sqlite/build/index.mjs:104:9)
    at file:///root/kill-the-newsletter/kill-the-newsletter/_/build/index.mjs:44:24 {
  code: 'ERR_DLOPEN_FAILED'
}

Node.js v22.1.0

The bounded better-sqlite3 actually needs GLIBC_2.33, that is ubuntu 22.04, as it's builded on top of the 22.04 runner of Github. But maybe we can build it on ubuntu-20.04 in the Github Action, which will fix the problem.

Ovler-Young commented 3 weeks ago

I'm pleased to report that building on Ubuntu 20.04 has successfully resolved the issue!

I made some adjustments to the workflow, as the code in version 2.0.1 doesn't compile with the latest Node.js version (v23). To ensure compatibility, I locked the Node.js version to 22.1.0, which matches the version used in your releases. You can see my successful build run at: https://github.com/Ovler-Young/kill-the-newsletter/actions/runs/11599220752

With these changes, the build process now works smoothly.

One minor hiccup I encountered was that my previous failed attempt had generated a malformed database. I had to remove this incorrect database to allow the migration to proceed correctly.