Closed broccolihighkicks closed 7 months ago
Try installing XCode and open it then run again the npm/yarn install process @broccolihighkicks
I ran into this issue on trying to run a file that is the result of esbuild --bundle
. A fix for this is to build better-sqlite3
in node_modules
first, and then copy the built folder Release
to your own build
:
cd node_modules/better-sqlite3
npm run build-release
# or `yarn build-release`
# move back to the source folder
cd ..
cd ..
# copy the folder itself
cp -r node_modules/better-sqlite3/build/Release/ build/
@JoshuaWise What piece of code tries to find the binding ? What obstacle prevents from patching it to try more in /node_modules
prefix ? The hack of @thanhnguyen2187 is way too dirty and seems to be the only option when using esbuild bundler that is the future and somewhere required. At the same time the solution seems to be a "oneliner", but I could not find the code in this repo briefly enough to make a PR. Looking forward to get a bit of help c:
@houd1ni The binding is found by the bindings
package, which automatically locates the binding for standard installations. If you are using some third-party bundler (like esbuild), it probably won't work, but you can always point to the binding manually by using the nativeBinding
option.
I ran into this issue on trying to run a file that is the result of
esbuild --bundle
. A fix for this is to buildbetter-sqlite3
innode_modules
first, and then copy the built folderRelease
to your ownbuild
:cd node_modules/better-sqlite3 npm run build-release # or `yarn build-release` # move back to the source folder cd .. cd .. # copy the folder itself cp -r node_modules/better-sqlite3/build/Release/ build/
For me this worked:
cd node_modules/better-sqlite3
npm run build-release
cd ..
I solved it by installing better-sqlite3
in Dockerfile
instead of package.json
& using pnpm
's supportedArchitectures
feature.
I get this error after install:
I noticed that
node-v108-darwin-arm64
is not in the release assets: https://github.com/WiseLibs/better-sqlite3/releases/tag/v7.6.2Also, the lookup folders above are looking in my projects folder
/x/
not/x/node_modules/better-sqlite3/
.Possible fix:
ln -s node_modules/better-sqlite3/build ./build
seems to avoid this issue.Can you patch better-sqlite3 to change look up paths to include `/x/node_modules/better-sqlite3/``?
Similar issues from 2018 that are closed.
Versions
Mac M1. Node v18.7.0.
yarn.lock
tree node_modules/better-sqlite3/build