Closed tisonkun closed 4 months ago
Thank you for the feedback. I've looked into possible solutions and found that the neon library we're using doesn't support generating static binaries (see https://github.com/neon-bindings/neon/issues/360). Actually, I used to build hexo-word-counter in a newer compilation environment with a higher libc version. However, some users are using Cloudflare Pages' build environment with an older libc version, which isn't compatible. So, I switched to use an older one, but unfortunately, it's incompatible with Vercel. I'm not sure what the best approach to resolving this issue would be. Do you have any suggestions?
@tisonkun I've found that Cloudflare Pages has updated their deployment environment, and I have now also updated to GLIBC version 2.31 on Ubuntu 20.04 (tests show that it also works under Ubuntu 22.04). You can try again.
npm i hexo-word-counter@0.2.0
Cloudflare Pages environment:
Netlify environment:
As of April 2024, both of them are using ubuntu 20.04
I have updated to 0.2.0 but it seems still try to find GLIBC 2.28?
Are you using Vercel for CI? I compiled your blog's code on a Vercel machine, and it shows that it works perfectly fine here. You can check if your Vercel build environment is different from mine. I am using Node.js 20.12.2.
Update: I think I know the cause of the problem. Switching to Node.js version 18 reproduces the same error.
Upgrade vercel runtime to Node 20 solves the issue.
Thank you!
This issue is very strange. Using this plugin with Node.js 18 doesn't work on Vercel, but it does work on Cloudflare Pages.
I don't think it's about Node version actually. Perhaps Vercel packages different GLIBC on their "node 18" env.
This is what I feel uncomfortable with @vercel:
I'm trying to get an info list about the details of env on their deployment, but none of their docs tell what version of GLIBC is available on a certain env.
Yes, in comparison, GitHub has done a good job; they have published the detailed version information of the software pre-installed in their CI images: https://github.com/actions/runner-images/blob/main/images/ubuntu/Ubuntu2004-Readme.md
See https://github.com/tisonkun/blog/issues/105.
I wonder if we can use a musl static link distribution or we can upgrade/extend the GLIBC requirement.