Anyone have a problem with `emitDecoratorMetadata`...
# help
ö
Anyone have a problem with
emitDecoratorMetadata
getting picked from tsconfig.json? I enabled it, however it keeps giving me
Could not reflect metadata of type design:type, did you forget to enable "emitDecoratorMetadata" on compiler options?
error
This is the
tsconfig.json
Copy code
{
  "$schema": "<https://json.schemastore.org/tsconfig>",
  "display": "Node 14",
  "compilerOptions": {
    "allowSyntheticDefaultImports": true,
    "baseUrl": "src",
    "emitDecoratorMetadata": true,
    "esModuleInterop": true,
    "experimentalDecorators": true,
    "forceConsistentCasingInFileNames": true,
    "lib": [
      "es2020"
    ],
    "module": "commonjs",
    "outDir": "build",
    "skipLibCheck": true,
    "strict": true,
    "target": "es2020"
  },
  "include": [
    "stacks",
    "src"
  ]
}
s
Do you have the
reflect-metadata
package installed? https://www.npmjs.com/package/reflect-metadata
ö
Yes, I have. and it is imported in the beginning of the handler entry file
f
Hey @Ömer Toraman, Let me loop in @thdxr, he’s more familiar w/ the TypeScript setup.
t
This might be an issue with esbuild I don't remember off the top of my head but I think it needs additional config?
ö
Idk, but I remember some doc on esbuild stating that it ignores some configurations in tsconfig
f
@thdxr is travelling today, I’m sure he can look into this in more details on Monday. Is this a blocking issue for you? Let me know if it is, and I can try to dig around.
ö
OH no Frank, it is totally fine. Thanks so much