Mastra cloud build fail

Build failed on mastra cloud :
Optimizing dependencies...
[ERROR]
[10/15/2025, 11:35:12 AM] - Build process failed for build 0a6a1e54-dfb5-4cb0-8cf5-11bc6839c359 and project 1bdb6641-df36-4cf0-8302-999d40860995: {"message":"Failed to analyze Mastra application: node_modules/.pnpm/google-logging-utils@0.0.2/node_modules/google-logging-utils/build/src/logging-utils.js (3:7): \"default\" is not exported by \"\u0000node:events?commonjs-external\", imported by \"node_modules/.pnpm/google-logging-utils@0.0.2/node_modules/google-logging-utils/build/src/logging-utils.js\".","details":{"message":"Failed to analyze Mastra application: node_modules/.pnpm/google-logging-utils@0.0.2/node_modules/google-logging-utils/build/src/logging-utils.js (3:7): \"default\" is not exported by \"\u0000node:events?commonjs-external\", imported by \"node_modules/.pnpm/google-logging-utils@0.0.2/node_modules/google-logging-utils/build/src/logging-utils.js\".","domain":"DEPLOYER","category":"SYSTEM","details":{}},"code":"DEPLOYER_BUNDLER_ANALYZE_FAILED"}
[ERROR]
[10/15/2025, 11:35:12 AM] - Failed to analyze Mastra application: node_modules/.pnpm/google-logging-utils@0.0.2/node_modules/google-logging-utils/build/src/logging-utils.js (3:7): "default" is not exported by "node:events?commonjs-external", imported by "node_modules/.pnpm/google-logging-utils@0.0.2/node_modules/google-logging-utils/build/src/logging-utils.js".
Optimizing dependencies...
[ERROR]
[10/15/2025, 11:35:12 AM] - Build process failed for build 0a6a1e54-dfb5-4cb0-8cf5-11bc6839c359 and project 1bdb6641-df36-4cf0-8302-999d40860995: {"message":"Failed to analyze Mastra application: node_modules/.pnpm/google-logging-utils@0.0.2/node_modules/google-logging-utils/build/src/logging-utils.js (3:7): \"default\" is not exported by \"\u0000node:events?commonjs-external\", imported by \"node_modules/.pnpm/google-logging-utils@0.0.2/node_modules/google-logging-utils/build/src/logging-utils.js\".","details":{"message":"Failed to analyze Mastra application: node_modules/.pnpm/google-logging-utils@0.0.2/node_modules/google-logging-utils/build/src/logging-utils.js (3:7): \"default\" is not exported by \"\u0000node:events?commonjs-external\", imported by \"node_modules/.pnpm/google-logging-utils@0.0.2/node_modules/google-logging-utils/build/src/logging-utils.js\".","domain":"DEPLOYER","category":"SYSTEM","details":{}},"code":"DEPLOYER_BUNDLER_ANALYZE_FAILED"}
[ERROR]
[10/15/2025, 11:35:12 AM] - Failed to analyze Mastra application: node_modules/.pnpm/google-logging-utils@0.0.2/node_modules/google-logging-utils/build/src/logging-utils.js (3:7): "default" is not exported by "node:events?commonjs-external", imported by "node_modules/.pnpm/google-logging-utils@0.0.2/node_modules/google-logging-utils/build/src/logging-utils.js".
8 Replies
Mastra Triager
Mastra Triagerโ€ข6d ago
๐Ÿ“ Created GitHub issue: https://github.com/mastra-ai/mastra/issues/8876
GitHub
[DISCORD:1427979921086484490] Mastra cloud build fail ยท Issue #887...
This issue was created from Discord post: https://discord.com/channels/1309558646228779139/1427979921086484490 Build failed on mastra cloud : Optimizing dependencies... [ERROR] [10/15/2025, 11:35:1...
_roamin_
_roamin_โ€ข6d ago
Hi @Rafik Belkadi ! Could you share your deployment id and project slug? Thanks ๐Ÿ™
Rafik Belkadi
Rafik BelkadiOPโ€ข6d ago
Hi @Romain ! slug: recapp deployment id: adc8b963-a700-435f-af0b-1d5f351666ea
_roamin_
_roamin_โ€ข6d ago
Thank you, sir!
Mastra Triager
Mastra Triagerโ€ข5d ago
๐Ÿ“ Created GitHub issue: https://github.com/mastra-ai/mastra/issues/8907
GitHub
mastra-ai/mastra
The TypeScript AI agent framework. โšก Assistants, RAG, observability. Supports any LLM: GPT-4, Claude, Gemini, Llama. - mastra-ai/mastra
Rafik Belkadi
Rafik BelkadiOPโ€ข4d ago
Hello, any updates ? ๐Ÿ™‚
_roamin_
_roamin_โ€ข4d ago
Wait, this should be fixed already, you still getting deployment errors? Can you try adding this to your package.json?
{
"overrides": {
"@rollup/plugin-commonjs": "28.0.6"
}
}
{
"overrides": {
"@rollup/plugin-commonjs": "28.0.6"
}
}
There's currently an issue with this package and it seems to be breaking our bundler (your might need to put the "overrides" under the "pnpm" key in your package.json depending on which package manager you're using)
Rafik Belkadi
Rafik BelkadiOPโ€ข15h ago
Yep it's still on error, i'll try this Still not able to deploy, i'll try to deploy on a custom server for the moment x) after upgrading to mastra --latest
[10/20/2025, 12:08:59 PM] - Optimizing dependencies...
[INFO]
[10/20/2025, 12:09:27 PM] - Bundling Mastra application
[WARN]
[10/20/2025, 12:09:29 PM] - Circular dependency found:
.mastra/.build/@mastra-loggers.mjs -> .mastra/.build/@mastra-loggers.mjs
[WARN]
[10/20/2025, 12:09:29 PM] - Circular dependency found:
.mastra/.build/@mastra-loggers-http.mjs -> .mastra/.build/@mastra-loggers-http.mjs
[ERROR]
[10/20/2025, 12:09:30 PM] - Build process failed for build de7a6bd7-a401-4f06-9c7a-f5052913ef95 and project 1bdb6641-df36-4cf0-8302-999d40860995: {"message":"Failed during bundler bundle stage: \"HttpTransport\" cannot be exported from \".mastra/.build/@mastra-loggers-http.mjs\" as it is a reexport that references itself.","details":{"message":"Failed during bundler bundle stage: \"HttpTransport\" cannot be exported from \".mastra/.build/@mastra-loggers-http.mjs\" as it is a reexport that references itself.","domain":"DEPLOYER","category":"SYSTEM","details":{}},"code":"DEPLOYER_BUNDLER_BUNDLE_STAGE_FAILED"}
[ERROR]
[10/20/2025, 12:09:30 PM] - Failed during bundler bundle stage: "HttpTransport" cannot be exported from ".mastra/.build/@mastra-loggers-http.mjs" as it is a reexport that references itself.
[10/20/2025, 12:08:59 PM] - Optimizing dependencies...
[INFO]
[10/20/2025, 12:09:27 PM] - Bundling Mastra application
[WARN]
[10/20/2025, 12:09:29 PM] - Circular dependency found:
.mastra/.build/@mastra-loggers.mjs -> .mastra/.build/@mastra-loggers.mjs
[WARN]
[10/20/2025, 12:09:29 PM] - Circular dependency found:
.mastra/.build/@mastra-loggers-http.mjs -> .mastra/.build/@mastra-loggers-http.mjs
[ERROR]
[10/20/2025, 12:09:30 PM] - Build process failed for build de7a6bd7-a401-4f06-9c7a-f5052913ef95 and project 1bdb6641-df36-4cf0-8302-999d40860995: {"message":"Failed during bundler bundle stage: \"HttpTransport\" cannot be exported from \".mastra/.build/@mastra-loggers-http.mjs\" as it is a reexport that references itself.","details":{"message":"Failed during bundler bundle stage: \"HttpTransport\" cannot be exported from \".mastra/.build/@mastra-loggers-http.mjs\" as it is a reexport that references itself.","domain":"DEPLOYER","category":"SYSTEM","details":{}},"code":"DEPLOYER_BUNDLER_BUNDLE_STAGE_FAILED"}
[ERROR]
[10/20/2025, 12:09:30 PM] - Failed during bundler bundle stage: "HttpTransport" cannot be exported from ".mastra/.build/@mastra-loggers-http.mjs" as it is a reexport that references itself.
`

Did you find this page helpful?