kriszyp / lmdb-js

Simple, efficient, ultra-fast, scalable data store wrapper for LMDB
Other
479 stars 39 forks source link

lmdb ^2.7.11 no longer installs on the Docker/node-alpine package #247

Closed AshKyd closed 1 year ago

AshKyd commented 1 year ago

Steps to reproduce:

  1. clone the minimal repro repo: https://github.com/AshKyd/lmdb-alpine-broken
  2. run docker build .

Expected: npm i command should complete Actual:

#0 0.974 npm ERR! code 126
#0 0.974 npm ERR! path /usr/src/app/node_modules/lmdb
#0 0.975 npm ERR! command failed
#0 0.975 npm ERR! command sh -c node-gyp-build-optional-packages
#0 0.975 npm ERR! sh: node-gyp-build-optional-packages: Text file busy

This issue cropped up sometime between the 3rd and 10th of June in my Parcel builds, but I've only now had a chance to narrow it down. I haven't had any luck googling this one, but surely I'm not the only one with this issue.

I'm getting this on an x86-64 platform. Npm reports the Alpine image is running: Linux 5.15.49-linuxkit-pr node v20.3.1 npm v9.6.7

Workaround:

Using node:lts-alpine rather than node:alpine seems to work. I had to use a specific version FROM node:18-alpine3.17, but that was for Parcel issues unrelated to lmdb.

AshKyd commented 1 year ago

Look, I'd be happy to just close this as an unsupported platform. But it kinda looks like something about the build step isn't working, so I'll leave it up to you :)

kriszyp commented 1 year ago

This repo/script actually doesn't show any errors for me. Maybe there is some dependence on host? (I am running on Ubuntu 23/x64).

AshKyd commented 1 year ago

Hm, that's surprising. I assumed it would be specific to the architecture+node version, but maybe there's something else going on.

I can't think of what that might be so I'll just close this one for now.

Thanks for looking into it!