Closed throrin19 closed 7 months ago
@throrin19 any chance this is related to https://github.com/middyjs/middy/commit/7c4cc5216a6cbf8f60dd6ea7f6011ab449a745b6 ? Which version of middy are you using? I see CJS in the loading path of your code and 3 weeks ago the v5 was releases dropping CJS support.
If that's the case, and you are using require
calls, you need to instead use import
calls.
Taken from another lib, an example of the migration path: https://github.com/ipfs/js-ipfs/blob/master/docs/upgrading/v0.62-v0.63.md#esm
Yep it's the cause. Very messy this migration between cjs/esm and typescript around all of it :/ .
Sorry for the disagreement
Describe the bug
When I try to generate type of a schema, extend other schema imported from a barrel file, I have exotic error from unused file in the targeted schema but imported in the barrel file :
To Reproduce Steps to reproduce the behavior:
And this is the barrel file
../../libs/middleware-validator/index.ts
:Expected behavior
I expect have not the error.
In notice, I have this error after passing to node 20.9 and typescript 5.3. Before, in node 18.x and typescript 5.2, I have no problems
And If I point directly to the schema file, I have no error. But I have to use the barrel file and to pass directly to it, not to directly point to schema file