Mastra build fails after latest updates

ERROR [2025-10-15 19:12:34.700 +0100] (Mastra CLI): Failed to analyze Mastra application: ../../node_modules/undici/lib/core/util.js (2:7): "default" is not exported by "node:assert?commonjs-external", imported by "../../node_modules/undici/lib/core/util.js". domain: "DEPLOYER" category: "SYSTEM" details: {}
6 Replies
Mayday
Mayday5d ago
Same here 🙁
Amos
Amos5d ago
same but different:
ERROR [2025-10-15 21:26:56.292 +0200] (Mastra CLI): Failed to analyze Mastra application: ../../node_modules/.pnpm/encoding-sniffer@0.2.1/node_modules/encoding-sniffer/dist/commonjs/index.js (3:7): "default" is not exported by "node:stream?commonjs-external", imported by "../../node_modules/.pnpm/encoding-sniffer@0.2.1/node_modules/encoding-sniffer/dist/commonjs/index.js".
domain: "DEPLOYER"
category: "SYSTEM"
details: {}
 ELIFECYCLE  Command failed with exit code 1.
ERROR [2025-10-15 21:26:56.292 +0200] (Mastra CLI): Failed to analyze Mastra application: ../../node_modules/.pnpm/encoding-sniffer@0.2.1/node_modules/encoding-sniffer/dist/commonjs/index.js (3:7): "default" is not exported by "node:stream?commonjs-external", imported by "../../node_modules/.pnpm/encoding-sniffer@0.2.1/node_modules/encoding-sniffer/dist/commonjs/index.js".
domain: "DEPLOYER"
category: "SYSTEM"
details: {}
 ELIFECYCLE  Command failed with exit code 1.
you can reproduce it here https://github.com/amosbastian/mastra-reproduction: upgrade everything to latest (pnpm update --recursive --latest) and run turbo build
_roamin_
_roamin_5d ago
Sorry about that 😢 We have a GH issue already open https://github.com/mastra-ai/mastra/issues/8876 Please feel free to chime in!
GitHub
mastra build fails with external modules · Issue #8876 · mastra...
There are peculiar bundling issues happening right now impacting local/cloud. googleapis with dependencies of google-logging-utils@0.0.2 and fetch-blob are impacting builds upon reinstallation. Pri...
_roamin_
_roamin_5d ago
Hey @Mayday & @Ghassen ! Are you guys using mastra in a monorepo?
Ghassen
GhassenOP5d ago
yes
Amos
Amos4d ago
latest doesn't show any error anymore when building but instead just freezes and dev still shows the errors from https://discord.com/channels/1309558646228779139/1420847587052752896/1420847587052752896

Did you find this page helpful?