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

Import of MastraStorage class is not pure #2517

Open
wardpeet opened this issue Feb 24, 2025 · 0 comments · May be fixed by #2518
Open

Import of MastraStorage class is not pure #2517

wardpeet opened this issue Feb 24, 2025 · 0 comments · May be fixed by #2518
Assignees
Labels
bug Something isn't working dependencies Pull requests that update a dependency file

Comments

@wardpeet
Copy link
Contributor

When importing stores like @mastra/pg it also imports libsql (default storage) class which is not ideal when using it inside frameworks like NextJS. It means libsql always eeds to be installed even if you're using pg vector utils.

Problem:

const pgVector = new PgVector(process.env.POSTGRES_CONNECTION_STRING!)
const mastraResults = await pgVector.query('embeddings', embedding, 10)

Image

@wardpeet wardpeet self-assigned this Feb 24, 2025
@github-actions github-actions bot added bug Something isn't working dependencies Pull requests that update a dependency file labels Feb 24, 2025
@wardpeet wardpeet linked a pull request Feb 24, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant