Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PSA: Workaround for build errors on Node 16.14+ or ARM: try @vscode/sqlite3 #1556

Closed
timoxley opened this issue Apr 7, 2022 · 5 comments
Closed

Comments

@timoxley
Copy link

timoxley commented Apr 7, 2022

Posting here for visibility until mapbox pops out a new sqlite3 release.

Try using @vscode/sqlite3 instead of sqlite3.

https://github.com/microsoft/vscode-node-sqlite3

Worked for me!

Possibly Related

runchard added a commit to s-build/apple-silicon-joplin-builder that referenced this issue Apr 8, 2022
@garyburgmann
Copy link

garyburgmann commented Apr 12, 2022

@timoxley I had success with Docker today. The special sauce appeared to be ln -s $(which python3) /usr/local/bin/python

ARG base_image=node:16-alpine

# https://github.com/nodejs/docker-node/blob/main/docs/BestPractices.md#node-gyp-alpine
FROM $base_image as builder

## Install build toolchain, install node deps and compile native add-ons
RUN apk add --no-cache --update python3 make g++
# needed for build of sqlite with node-gyp
RUN ln -s $(which python3) /usr/local/bin/python
WORKDIR /builder
COPY . .
# install node_modules here due to node-gyp dependencies
RUN npm ci
...

@carlosfaria94
Copy link

Ghost team have taken the node-sqlite3 development! Great news for everyone! 🙏🚀

@daniellockyer
Copy link
Member

This should be fixed in sqlite3 v5.0.3 - let me know if you still experience issues 🙂

@jose-nunez
Copy link

I had problems with v5.0.2
v5.0.3 worked for me on Mac M1 - Node v16

@daniellockyer
Copy link
Member

FYI v5.1.1 now comes with prebuilt Darwin ARM64 binaries 🙂 https://github.com/TryGhost/node-sqlite3/releases/tag/v5.1.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants