-
Notifications
You must be signed in to change notification settings - Fork 20
fix: OpenMemory setup script to use npm and clone repository #98
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
base: main
Are you sure you want to change the base?
Conversation
|
@Hebx is attempting to deploy a commit to the dark Team on Vercel. A member of the Team first needs to authorize it. |
package.json
Outdated
| "client": "cd apps/client && bun run web", | ||
| "server": "cd apps/server && bun run dev", | ||
| "openmemory": "cd services/openmemory/backend && bun start", | ||
| "openmemory": "cd services/openmemory/backend && npm start", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Hebx is there a reason we're moving from bun to npm? would prefer to keep npm across the board
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should be fixed in next commit, was a version mismatch of esbuild.
README.md
Outdated
| ``` | ||
|
|
||
| See [apps/client/__tests__/CHAT_STATE_TESTS.md](./apps/client/__tests__/CHAT_STATE_TESTS.md) for full testing documentation. | ||
| See [apps/client/**tests**/CHAT_STATE_TESTS.md](./apps/client/__tests__/CHAT_STATE_TESTS.md) for full testing documentation. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
are we moving to **tests** instead of __tests__ somewhere?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo.
- Add repository cloning from CaviraOSS/OpenMemory if missing - Switch from bun to npm to fix esbuild version compatibility issues - Add dependency installation step before building - Fix path references to use relative paths - Create data directory if missing - Update package.json script to use npm start - Update server health check for cavira.app OpenMemory endpoints - Update README with setup instructions and npm usage Fixes issue where setup script failed due to: - Missing repository (assumed it existed) - esbuild version mismatch with bun - Missing dependency installation step
… .env file The heredoc used << 'EOF' which prevented shell variable expansion, causing literal syntax like OM_EMBED_PROVIDER= to be written instead of actual values. Changed to << EOF to allow proper variable expansion.
Previously, HTTP 401 (authentication failure) and 404 (not found) were treated as successful connections, which masked authentication failures and incorrect endpoint configurations. Now only HTTP 200 indicates a successful connection, with specific error messages for 401 and 404.
- Add esbuild 0.25.12 as direct devDependency in OpenMemory backend - Update setup script to use bun instead of npm - Fix README typo: **tests** → __tests__ - Update all references from npm to bun for consistency This fixes the root cause of the esbuild version mismatch (bun was resolving to 0.25.11 but postinstall script expected 0.25.12) by pinning the version, allowing us to use bun consistently throughout the project instead of switching to npm as a workaround.
f80ce29 to
e3adc1a
Compare
Description
Fixes the OpenMemory setup script (
services/openmemory-setup.sh) to properly install and configure the CaviraOSS OpenMemory backend. The script was failing because:buncaused compatibility issues with esbuild (expected 0.25.11, got 0.25.12)This PR fixes all these issues and updates related files to use npm consistently.
Type of Change
Release
Is this a release? No
Testing
Clean setup test:
Existing setup test:
Start OpenMemory:
Server health check:
Checklist
What's Changed
services/openmemory-setup.shhttps://github.com/CaviraOSS/OpenMemory.gitbuntonpmfor dependency installation and buildingcd "$(dirname "$0")")openmemory/backend/dataset -eandset -o pipefailpackage.jsonopenmemoryscript frombun starttonpm startapps/server/src/server.ts/health)npm startinstead ofbun startREADME.mdbash services/openmemory-setup.shfirstopenmemory_dev_key)GEMINI_API_KEYfor free embeddingsWhy npm instead of bun?
The OpenMemory backend has a dependency on
esbuildthat has version compatibility issues with bun. When using bun, the postinstall script fails with:Using npm resolves this issue as npm's dependency resolution handles the esbuild version correctly. The rest of the project continues to use bun, but OpenMemory backend specifically uses npm.
Files Changed
services/openmemory-setup.sh(main fix)package.json(updated script)apps/server/src/server.ts(updated health check and error messages)README.md(updated documentation)