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

Better-sqlite3 build error, even when running with Docker #131

Open
brownrygg opened this issue Feb 5, 2025 · 11 comments
Open

Better-sqlite3 build error, even when running with Docker #131

brownrygg opened this issue Feb 5, 2025 · 11 comments

Comments

@brownrygg
Copy link

Followed all the easy start instructions without docker but was running into better-sqlite3 errors. Figured I was messing up the module dependencies somehow. Tried many more times with different configs, but got nowhere.

Now trying to build with the docker compose, but still cannot get around the better-sqlite3 errors.

On Windows 11, running in WSL 2 Ubuntu 22.04. Have docker desktop installed and running containers to Ubuntu.

Error:
241.4 .../node_modules/better-sqlite3 install: gyp ERR! build error
241.4 .../node_modules/better-sqlite3 install: gyp ERR! stack Error: make failed with exit code: 2
241.4 .../node_modules/better-sqlite3 install: gyp ERR! stack at ChildProcess. (/usr/local/lib/node_modules/pnpm/dist/node_modules/node-gyp/lib/build.js:216:23)
241.4 .../node_modules/better-sqlite3 install: gyp ERR! System Linux 5.15.167.4-microsoft-standard-WSL2
241.4 .../node_modules/better-sqlite3 install: gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/pnpm/dist/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--release"
241.4 .../node_modules/better-sqlite3 install: gyp ERR! cwd /app/node_modules/.pnpm/better-sqlite3@8.0.1/node_modules/better-sqlite3
241.4 .../node_modules/better-sqlite3 install: gyp ERR! node -v v23.3.0
241.4 .../node_modules/better-sqlite3 install: gyp ERR! node-gyp -v v10.2.0
241.4 .../node_modules/better-sqlite3 install: gyp ERR! not ok
241.4 .../node_modules/better-sqlite3 install: Failed

Dear God please help.

@DavidLazar13
Copy link

Not sure if related but for me I get this when try to start the agent locally
Image

@amit-immanent
Copy link

whats your node version ?

@brownrygg
Copy link
Author

Not sure if related but for me I get this when try to start the agent locally Image

Yeah @DavidLazar13, I got the same thing locally, which is why I moved to docker - hoping that the container would build everything correctly.

@amit-immanent node 23.3.0

Could it be a better-sqlite3 update, or change int the core package?

@alohamonius
Copy link

conda create -n node-build python=3.11
conda activate node-build
pnpm config set python3.11

cd node_modules/better-sqlite3
pnpm build-release

@brownrygg
Copy link
Author

@alohamonius thanks for this! I must apologize though, I'm still new to all of this. Should I add these to my docker-compose.yaml file to extract the right better-sqlite3 node?

@alohamonius
Copy link

@brownrygg i'm not sure now, but at least need to understand that not only node version crucial, python also play some role

@Mer-idium
Copy link

Mer-idium commented Feb 7, 2025

The below will work, something appears to be wrong with the better-sqlite3 package. Manually installing it worked for me.

cd eliza-starter/node_modules/better-sqlite3
pnpm install

Running your normal start script should then work, make sure you specify the character model you are using as per below.
pnpm start --character="characters/deep-thought.character.json"

@ykaravas
Copy link

ykaravas commented Feb 7, 2025

I got the same error and figured out the manual install step as well, but when i run pnpm start, i get to the following point (The last INFO in the image) and when i press enter it has the "You:"'s after.

Image

Then if i type anything after the "You:" and press enter i get the following:

Image

I ran with just "pnpm start" though. When i run with the default character in the character's directory, i seem to get something along these lines:

Image

@madjin
Copy link
Contributor

madjin commented Feb 11, 2025

went through this same issue, going to update the docs until issue is fixed

@alohamonius
Copy link

Tried to do it on ubuntu machine, conda version not enough
sudo apt update
sudo apt install build-essential
to build sqlite

@anthonykimani
Copy link

The below will work, something appears to be wrong with the better-sqlite3 package. Manually installing it worked for me.

cd eliza-starter/node_modules/better-sqlite3 pnpm install

Running your normal start script should then work, make sure you specify the character model you are using as per below. pnpm start --character="characters/deep-thought.character.json"

This solution worked for me

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

No branches or pull requests

8 participants