NoImportModuleInSchema
hello! 👋
so I got this error from convex server after saving changes in a file - but had no idea what this means (also didn't find anything on the docs). Curious if anyone has insights? Appreciate it!!
400 Bad Request: NoImportModuleInSchema: Hit an error while evaluating your schema: Can't import _deps/SATAODX3.js while evaluating schema
3 Replies
thank you @ian !!! starting a thread to preserve context if easier.
So I got this error when modifying the memory.ts in ai-town. What I did was instead of calling
chatCompletion
, i wrote a ollamaChatCompletion
that uses Langchain to call ollama.
I didn't modify anything on schema.ts so that's why I was super confused. Would appreciate any pointers!My guess is that
schema.ts
is importing memory.ts
, which is importing something from new code you added that Convex is unable to evaluate in our runtime (but probably works perfectly fine in node). Maybe breaking out memoryTables
into its own file and importing that from schema.ts
will resolve it? (I'm going off of https://github.com/a16z-infra/ai-town/blob/be7a2b076c7512535578234f478e96a4ac919b87/convex/agent/schema.ts#L1)
Definitely a confusing error...GitHub
ai-town/convex/agent/schema.ts at be7a2b076c7512535578234f478e96a4a...
A MIT-licensed, deployable starter kit for building and customizing your own version of AI town - a virtual town where AI characters live, chat and socialize. - a16z-infra/ai-town
Ohhh thanks so much for this!!! let me do some refactoring. Appreciate it 🙏 🙏 ❤️ @sshader