M
Mastraโ€ข4w ago
Ghassen

Mastra wasn't able to build your project. Please add ... to your externals

Even though I added the packages to externals, I still get the error
const newMastra = new Mastra({ ...mastraConfig, bundler: { externals: ["mssql", "ioredis"], } });

#16 12.68 INFO [2025-11-09 03:14:25.628 +0000] (Mastra CLI): Optimizing dependencies...
#16 38.23 ERROR [2025-11-09 03:14:51.181 +0000] (Mastra CLI): Mastra wasn't able to build your project. Please add `mssql` to your externals.
#16 38.23
#16 38.23 export const mastra = new Mastra({
#16 38.23 bundler: {
#16 38.23 externals: ["mssql"],
#16 38.23 }
#16 38.23 })
#16 38.23 domain: "DEPLOYER"
#16 38.23 category: "USER"
#16 38.23 details: {
#16 38.23 "importFile": "/app/node_modules/mssql/index.js",
#16 38.23 "packageName": "mssql"
#16 38.23 }
const newMastra = new Mastra({ ...mastraConfig, bundler: { externals: ["mssql", "ioredis"], } });

#16 12.68 INFO [2025-11-09 03:14:25.628 +0000] (Mastra CLI): Optimizing dependencies...
#16 38.23 ERROR [2025-11-09 03:14:51.181 +0000] (Mastra CLI): Mastra wasn't able to build your project. Please add `mssql` to your externals.
#16 38.23
#16 38.23 export const mastra = new Mastra({
#16 38.23 bundler: {
#16 38.23 externals: ["mssql"],
#16 38.23 }
#16 38.23 })
#16 38.23 domain: "DEPLOYER"
#16 38.23 category: "USER"
#16 38.23 details: {
#16 38.23 "importFile": "/app/node_modules/mssql/index.js",
#16 38.23 "packageName": "mssql"
#16 38.23 }
PS: I'm using beta packages. This happens even in the stable packages
4 Replies
Mastra Triager
Mastra Triagerโ€ข4w ago
๐Ÿ“ Created GitHub issue: https://github.com/mastra-ai/mastra/issues/10213 ๐Ÿ” If you're experiencing an error, please provide a minimal reproducible example to help us resolve it quickly. ๐Ÿ™ Thank you @Ghassen for helping us improve Mastra!
Ghassen
GhassenOPโ€ข3w ago
GitHub
Mastra wasn't able to build your project ยท Issue #9808 ยท mastra-a...
This issue was created from Discord post 1435714988269633647: Getting this error > @acme/worker@ build /Users/amosbastian/Development/mastra-reproduction/apps/worker > mastra build INFO [2025...
_roamin_
_roamin_โ€ข3w ago
Hey @Ghassen ! Thanks for the repro, I bumped this issue to urgent. I also closed the GH issue that was created for this thread, so please watch this GH issue for updates instead ๐Ÿ˜‰ https://github.com/mastra-ai/mastra/issues/9808
GitHub
Mastra wasn't able to build your project ยท Issue #9808 ยท mastra-a...
This issue was created from Discord post 1435714988269633647: Getting this error > @acme/worker@ build /Users/amosbastian/Development/mastra-reproduction/apps/worker > mastra build INFO [2025...

Did you find this page helpful?