How to debug runtime server issues
Hi we are incorporating mastra into our codebase, but for certain tools calling our other existing functions we get errors like (From Typeorm and decimal.js imported in other files):
ColumnTypeUndefinedError: Column type for AppProfile#appName is not defined and cannot be guessed. Make sure you have turned on an "emitDecoratorMetadata": true option in tsconfig.json. Also make sure you have imported "reflect-metadata" on top of the main entry file in your application (before any entity imported).If you are using JavaScript instead of TypeScript you must explicitly provide a column type.
at ColumnTypeUndefinedError.TypeORMError [as constructor] (/Users/ericyu/Documents/GitHub/rutter-backend/node_modules/typeorm/error/TypeORMError.js:9:28)
at new ColumnTypeUndefinedError (/Users/ericyu/Documents/GitHub/rutter-backend/node_modules/typeorm/error/ColumnTypeUndefinedError.js:13:23)
at /Users/ericyu/Documents/GitHub/rutter-backend/node_modules/typeorm/decorator/columns/Column.js:45:23
at decorateClass$c (file:///Users/ericyu/Documents/GitHub/rutter-backend/.mastra/output/index.mjs:1097:24)
at file:///Users/ericyu/Documents/GitHub/rutter-backend/.mastra/output/index.mjs:1114:1
at ModuleJob.run (node:internal/modules/esm/module_job:271:25)
at async onImport.tracePromise.proto__ (node:internal/modules/esm/loader:578:26)
at async asyncRunEntryPointWithESMLoader (node:internal/modules/run_main:116:5)
file:///Users/ericyu/Documents/GitHub/rutter-backend/.mastra/output/index.mjs:31
import Decimal, { Decimal as Decimal$1 } from 'decimal.js';
^^^^^^^
SyntaxError: The requested module 'decimal.js' does not provide an export named 'Decimal'
at ModuleJob._instantiate (node:internal/modules/esm/module_job:180:21)
at async ModuleJob.run ....
What is the best way to debug these?
ColumnTypeUndefinedError: Column type for AppProfile#appName is not defined and cannot be guessed. Make sure you have turned on an "emitDecoratorMetadata": true option in tsconfig.json. Also make sure you have imported "reflect-metadata" on top of the main entry file in your application (before any entity imported).If you are using JavaScript instead of TypeScript you must explicitly provide a column type.
at ColumnTypeUndefinedError.TypeORMError [as constructor] (/Users/ericyu/Documents/GitHub/rutter-backend/node_modules/typeorm/error/TypeORMError.js:9:28)
at new ColumnTypeUndefinedError (/Users/ericyu/Documents/GitHub/rutter-backend/node_modules/typeorm/error/ColumnTypeUndefinedError.js:13:23)
at /Users/ericyu/Documents/GitHub/rutter-backend/node_modules/typeorm/decorator/columns/Column.js:45:23
at decorateClass$c (file:///Users/ericyu/Documents/GitHub/rutter-backend/.mastra/output/index.mjs:1097:24)
at file:///Users/ericyu/Documents/GitHub/rutter-backend/.mastra/output/index.mjs:1114:1
at ModuleJob.run (node:internal/modules/esm/module_job:271:25)
at async onImport.tracePromise.proto__ (node:internal/modules/esm/loader:578:26)
at async asyncRunEntryPointWithESMLoader (node:internal/modules/run_main:116:5)
file:///Users/ericyu/Documents/GitHub/rutter-backend/.mastra/output/index.mjs:31
import Decimal, { Decimal as Decimal$1 } from 'decimal.js';
^^^^^^^
SyntaxError: The requested module 'decimal.js' does not provide an export named 'Decimal'
at ModuleJob._instantiate (node:internal/modules/esm/module_job:180:21)
at async ModuleJob.run ....
What is the best way to debug these?