MastraM
Mastra4mo ago
6 replies
victorCheckr

Netlify deployer error

Hello, I am trying MastraAI out for an internal mcp server project I am building. My team already has a netlify account so I am trying to deploy a standalone mastra app to netlify using the netlify deployer as outlined in the docs.

The deploy is successful on Netlify but I then I get the following error on the function call to the api endpoint. The error can also be viewed here ->
https://checkr-mastra-storyblok.netlify.app/


SyntaxError: Identifier '__filename' has already been declared
    at compileSourceTextModule (node:internal/modules/esm/utils:346:16)
    at ModuleLoader.moduleStrategy (node:internal/modules/esm/translators:107:18)
    at #translate (node:internal/modules/esm/loader:536:12)
    at ModuleLoader.loadAndTranslate (node:internal/modules/esm/loader:583:27)
    at async ModuleJob._link (node:internal/modules/esm/module_job:162:19)


This is my mastra config
export const mastra = new Mastra({
    workflows: { weatherWorkflow },
    agents: { weatherAgent },
    logger: new PinoLogger({
        name: 'Mastra',
        level: 'info',
    }),
    observability: {
        default: { enabled: true },
    },
    mcpServers: {
        server: storyblokMcpServer,
    },
    deployer: new NetlifyDeployer(),
});


These are my project deps:
"dependencies": {
    "@mastra/core": "^0.22.2",
    "@mastra/evals": "^0.14.1",
    "@mastra/deployer-netlify": "^0.13.12",
    "@mastra/libsql": "^0.16.0",
    "@mastra/loggers": "^0.10.17",
    "@mastra/mcp": "^0.14.0",
    "@mastra/memory": "^0.15.8",
    "storyblok-js-client": "^7.1.5",
    "zod": "^4.1.12"
  },
  "devDependencies": {
    "@types/node": "^24.9.1",
    "mastra": "^0.17.3",
    "typescript": "^5.9.3"
  }
Was this page helpful?