Better-sqlite3: Docker build - No prebuilt binaries

Created on 1 May 2020  路  3Comments  路  Source: JoshuaWise/better-sqlite3

Hi,
when I'm installing better-sqlite3 in my docker container, the following warning appears

prebuild-install WARN install No prebuilt binaries found (target=12.16.3 runtime=node arch=x64 libc=musl platform=linux)

shouldn't there be a prebuilt version for Node 12 on Linux?

Best regards

Most helpful comment

This only happens when using one of the alpine-based images (e.g. node:12-alpine), because those use musl as the standard library and better-sqlite3 only has prebuilt binaries for glibc. Switching to a debian-based image (e.g. 12-slim) works, but it would be nice if you could provide prebuilt binaries for alpine as well as they are used quite frequently.

All 3 comments

Works for me, share your Dockerfile

$ docker run --rm -it node:12 /bin/bash
root@114948abc5b7:/# npm i better-sqlite3

> [email protected] install /node_modules/better-sqlite3
> prebuild-install || npm run build-release

npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN [email protected] No description
npm WARN [email protected] No repository field.

+ [email protected]
added 68 packages from 38 contributors and audited 116 packages in 4.996s

1 package is looking for funding
  run `npm fund` for details

found 0 vulnerabilities

This only happens when using one of the alpine-based images (e.g. node:12-alpine), because those use musl as the standard library and better-sqlite3 only has prebuilt binaries for glibc. Switching to a debian-based image (e.g. 12-slim) works, but it would be nice if you could provide prebuilt binaries for alpine as well as they are used quite frequently.

Ah, thanks.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Babalon921 picture Babalon921  路  3Comments

k1ngrnbz picture k1ngrnbz  路  4Comments

mann-david picture mann-david  路  5Comments

imtbl picture imtbl  路  6Comments

spiffytech picture spiffytech  路  5Comments