-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Open
Labels
Mastra ServerIssues related to the Mastra Server or its handlersIssues related to the Mastra Server or its handlersdiscordFor issues created from Discord discussions.For issues created from Discord discussions.p: urgentUrgent priorityUrgent prioritytrio-tb
Description
This issue was created from Discord post 1442313801625239644:
Hi! I’ve got an error that has started happening consistently on my machine but not on any of my coworkers, and I’m looking for some guidance from someone who works with the Mastra source - I think it’s likely an easy fix for someone familiar with the codebase. I'm not sure if I can provide any reproduction given how my coworkers don't have this issue with the same codebase.
- Mastra's auto-generated
provider-registry.jsonbecomes malformed on my machine every time for unknown reasons - This could be bypassed if I could turn off dynamic loading but there does not appear to be a way to do that without me editing the code directly.
- Relevant code:
packages/core/src/llm/model/provider-registry.ts
- Relevant code:
- This means
mastra devdoesn't work on my machine at all without some very awkward workarounds.
I'm still investigating why the JSON file is malformed on my machine, but I could do with some
advice on this.
When I run mastra dev but not with build + start:
Error: Failed to load provider registry with dynamic loading. Make sure provider-registry.json is generated by running: npm run generate:providers
Tried paths:
[...]/packages/mastra/node_modules/@mastra/core/dist/provider-registry.json: Unexpected non-whitespace character after JSON at position 77837 (line 2483 column 2)
[...]
at loadRegistry (file://[...]/packages/mastra/node_modules/@mastra/core/dist/chunk-II37LKES.js:2234:9)
at _GatewayRegistry.getProviders (file://[...]/packages/mastra/node_modules/@mastra/core/dist/chunk-II37LKES.js:2459:18)
at Object.ownKeys (file://[...]/packages/mastra/node_modules/@mastra/core/dist/chunk-II37LKES.js:2249:32)
at Function.entries (<anonymous>)
at getStaticProvidersByGateway (file://[...]/packages/mastra/node_modules/@mastra/core/dist/chunk-II37LKES.js:2497:36)
[...]]
Metadata
Metadata
Assignees
Labels
Mastra ServerIssues related to the Mastra Server or its handlersIssues related to the Mastra Server or its handlersdiscordFor issues created from Discord discussions.For issues created from Discord discussions.p: urgentUrgent priorityUrgent prioritytrio-tb