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

mastra dev in TypeScript monorepo doesn't correctly handle dependencies #1996

Open
ryaninvents opened this issue Feb 21, 2025 · 1 comment
Open
Labels
dependencies Pull requests that update a dependency file enhancement New feature or request

Comments

@ryaninvents
Copy link

ryaninvents commented Feb 21, 2025

I'm working in a monorepo, and I've got my tools defined using TypeScript in other packages. My Mastra agent depends on these packages using "@local/dependency-name": "workspace:^" in my package.json. However, I get an error when I try to add these to my Mastra agent: TypeError [ERR_UNKNOWN_FILE_EXTENSION]: Unknown file extension ".ts" for ${filepath}. I have a main.ts that calls the agent API, and when I run this using tsx it works as expected.

Would the team be willing to support customization of the Rollup config, for cases like this where further customization is merited? Perhaps this can be set with an env var or similar.

@github-actions github-actions bot added dependencies Pull requests that update a dependency file enhancement New feature or request labels Feb 21, 2025
@abhiaiyer91
Copy link
Contributor

Hi @ryaninvents ! Nice catch! We definitely want to support this monorepo cases! Open to PRs otherwise mister @wardpeet will take a look

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants