Bug Report
Description
mastra studio deploy creates the project successfully but the deployed server fails to start with a SyntaxError about a missing export in @mastra/core/evals.
Environment
mastra: 1.5.0 (latest)
@mastra/core: 1.24.1 (latest)
@mastra/memory: 1.15.0
@mastra/pg: 1.9.0
@mastra/observability: 1.9.0
- Node.js: v22.14.0 (local), v22.22.2 (platform sandbox)
- OS: Windows 11
Steps to Reproduce
- Set up a Mastra project with
@mastra/core@1.24.1 and mastra@1.5.0
- Run
mastra studio deploy
- Build completes successfully (Build completed ~90s)
- Artifact is uploaded and deployed to sandbox
- Server fails to start
Error
file:///home/daytona/app/output/index.mjs:30
import { extractTrajectoryFromTrace, listScoresResponseSchema as listScoresResponseSchema$1 } from '@mastra/core/evals';
^^^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: The requested module '@mastra/core/evals' does not provide an export named 'extractTrajectoryFromTrace'
at ModuleJob._instantiate (node:internal/modules/esm/module_job:226:21)
at async ModuleJob.run (node:internal/modules/esm/module_job:335:5)
at async onImport.tracePromise.__proto__ (node:internal/modules/esm/loader:665:26)
at async asyncRunEntryPointWithESMLoader (node:internal/modules/run_main:117:5)
Node.js v22.22.2
Start failed after 1m34s: Server failed to become healthy after 30 attempts
Failed: Server failed to become healthy after 30 attempts
Deploy Logs
Creating sandbox... (3.0s)
Downloading artifact... (2.1s)
Injecting platform config... (13.8s)
Installing dependencies... (10.9s)
Startup script written (0.1s)
[error above]
Analysis
The bundled output/index.mjs (generated by mastra build) imports extractTrajectoryFromTrace from @mastra/core/evals. However, the @mastra/core@1.24.1 package (latest on npm) does not export this symbol.
It appears the platform is injecting a version of @mastra/core during "Injecting platform config" step that is either:
- An older version that doesn't have this export yet, OR
- A newer internal version that the bundler references but isn't published to npm
The result is a version mismatch between the bundled code and the installed package on the platform.
Expected Behavior
mastra studio deploy should successfully start the server after deployment.
Workaround
None found. The issue reproduces consistently on every deploy attempt with the latest published versions.
Bug Report
Description
mastra studio deploycreates the project successfully but the deployed server fails to start with aSyntaxErrorabout a missing export in@mastra/core/evals.Environment
mastra: 1.5.0 (latest)@mastra/core: 1.24.1 (latest)@mastra/memory: 1.15.0@mastra/pg: 1.9.0@mastra/observability: 1.9.0Steps to Reproduce
@mastra/core@1.24.1andmastra@1.5.0mastra studio deployError
Deploy Logs
Analysis
The bundled
output/index.mjs(generated bymastra build) importsextractTrajectoryFromTracefrom@mastra/core/evals. However, the@mastra/core@1.24.1package (latest on npm) does not export this symbol.It appears the platform is injecting a version of
@mastra/coreduring "Injecting platform config" step that is either:The result is a version mismatch between the bundled code and the installed package on the platform.
Expected Behavior
mastra studio deployshould successfully start the server after deployment.Workaround
None found. The issue reproduces consistently on every deploy attempt with the latest published versions.