Mastra Cloud Deployment Failing Due to @mastra/cloud Version Incompatibility
I can't deploy my project to Mastra Cloud because of a version conflict that might be caused by your deployment system.
The Problem:
Your packages have incompatible version requirements:
-
-
2. Tweak your cloud bundler to respect the exact package versions specified in package.json? Thanks! PS, If it is of any significance, I am in a monorepo setup. PPS, Here's the project: https://cloud.mastra.ai/lloyds-team/dashboard/projects/salmon-lemon-apartment/runtime/deployment
@mastra/cloud requires @mastra/core versions 0.10.7-0.14.0-
@mastra/evals requires @mastra/core versions 0.15.3+
This makes it impossible to use both packages together.
What I Tried:
Attempt 1 - Using "latest" versions:
❌ Failed: Version conflict during npm install
Attempt 2 - Using specific compatible versions:
✅ Local install works perfectly
❌ Mastra Cloud deployment still fails
The Bug:
Even though my package.json specifies "@mastra/evals": "^0.13.7", your cloud deployment system ignores this and tries to install @mastra/evals@"latest" during bundling, which recreates the same version conflict.
Evidence:
My local pnpm install succeeds, but your cloud bundler logs show:
This suggests your deployment system is overriding my package.json versions.
Request:
Are you able to either:
1. Update @mastra/cloud to support newer @mastra/core versions, OR2. Tweak your cloud bundler to respect the exact package versions specified in package.json? Thanks! PS, If it is of any significance, I am in a monorepo setup. PPS, Here's the project: https://cloud.mastra.ai/lloyds-team/dashboard/projects/salmon-lemon-apartment/runtime/deployment
Mastra Cloud
The serverless platform for AI Agents
8 Replies
Unknown User•4w ago
Message Not Public
Sign In & Join Server To View
📝 Created GitHub issue: https://github.com/mastra-ai/mastra/issues/8108
GitHub
[DISCORD:1419671762030825563] Mastra Cloud Deployment Failing Due t...
This issue was created from Discord post: https://discord.com/channels/1309558646228779139/1419671762030825563 I can't deploy my project to Mastra Cloud because of a version conflict that might...
Thanks for the detailed response re: The two-stage install process.
Answers to your questions:
1. Can I build locally with
pnpm mastra build?
No – Local build fails consistently actually.
2. Issues with @mastra/evals?
No previous issues.
3. Circular references?
There are no obvious circular references.
I also fixed all mixed TypeScript exports (like export { func, type Type }) by separating them into:
However, the build still fails because the Mastra builder (on the face of it) does not seem to be able to handle TypeScript type exports:
Even clean, separated export type { TypeName } syntax fails.
It seems that the Mastra bundler marks @mastra/evals as "external" because it encounters TypeScript syntax it can't parse in my project's core package, which @mastra/evals depends on. The version conflict happens during the second (p)npm install when it tries to install the "external" package.
The config warning occurs even though my export follows the suggested pattern:
I'm definitely interested in a call if that helps – I am OOO until Oct 2nd though.
I believe that the reason the Mastra build fails is because Mastra's bundler performs a workspace-wide dependency analysis and fails when it encounters any TypeScript export type syntax anywhere in the dependency tree (even if the entry point doesn't use it).Unknown User•4w ago
Message Not Public
Sign In & Join Server To View
Hi @Yujohn I was just wondering if you had chance to see my latest message on this
Unknown User•2w ago
Message Not Public
Sign In & Join Server To View
Did the team have chance to look at this?
having the same issue