Where on the filesystem is it trying to create the sqlite database?
Status Fixed / completed
Maintainer reply ✓ Yes — wolffiex
Workaround ✓ Mentioned in thread ↓
Activity 10 comments · opened May 6, 2025 · closed May 7, 2025
💡 Likely answer: A maintainer (wolffiex, collaborator)
responded on this thread — see the highlighted reply below.
For running containered, I'd like to know were on the filesystem the CLI is trying to create the database so I can ensure it's mapped in as a bind mount, persisted between sessions, and has the correct permissions inside the container to read and write the database.
This is what I'm seeing:
codeuser@8419d2b29ca8:/app$ claude --resume
Database is not available. Continue/resume features are disabled.
This is likely due to issues with the better-sqlite3 dependency.
To fix: Try globally reinstalling better-sqlite3 with your package manager.
For more detail, see: https://github.com/WiseLibs/better-sqlite3/blob/master/docs/troubleshooting.md
And I'm fairly confident it's just a read/write issue on whatever path the CLI is trying to use for this database I need to sort out in my container.
10 Comments
I'm continuing to get this also. I'm using just the nodejs provided by homebrew.
I noticed that whenever Claude code auto-updates, it's wiping out whatever existing dependency cache was there.
Workaround for me is now:
And that fixes it. Having to do it every auto-update by Claude is very annoying though.
Related issues: https://github.com/anthropics/claude-code/issues?q=is%3Aissue%20state%3Aclosed%20sqlite
Got the same issue as @ianchesal on linux, having both claude and better-sqlite3 installed globally. Verified that sqlite works in the project dir, and claude says npm permissions are OK. But the warning persists and I also think it a read/write permission issue but not sure howto fix it.
This warning suddenly popped up after the latest auto-update it seems.
Ahh well. If it's happening outside of a container for @abraithwaite and @askibinski maybe it's an actual bug and not me being paranoid and jailing stuff in a container?
My container setup for repro is here: https://github.com/ianchesal/agent-containers/tree/main/claude-code
This doesn't help for me. The module builds correctly inside my container, but I still get the DB missing error when starting
claude.I appreciate the tip though!
happy to help with this @ianchesal
the db is currently stored in ~/.claude/__store.db and this location and not configurable
for the next release I can update this so it respects $CLAUDE_CONFIG_DIR
As of
0.2.103the __store.db file containing the database will respect the$CLAUDE_CONFIG_DIRsetting@wolffiex thank you! That was exactly what I needed to fix my problem. Mounting ~/.claude in to my container
rwstopped the database error from occurring.Any chance, with
~/.claudegrowing in use, that you'll re-home~/.claude.jsonto~/.claude/claude.jsonso the configuration file, the global rule file~/.claude/CLAUUDE.mdand all the other generated files are all in one sub-directory?For the curious, my launch call for my container is now:
Yes, we are headed in the direction of having everything inside ~/.claude Glad this helped!
Amazing. As a (very) long time
vimuser, working with Claude at the command line has been the best way to add AI to my coding workflow yet.This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.