tsoa icon indicating copy to clipboard operation
tsoa copied to clipboard

Add @types/multer as peerDependency

Open azven-aumni opened this issue 3 years ago • 5 comments
trafficstars

Sorting

  • I'm submitting a ...

    • [x] bug report
    • [ ] feature request
    • [ ] support request
  • I confirm that I

    • [x] used the search to make sure that a similar issue hasn't already been submit

Expected Behavior

The yarn build CircleCI test should pass.

Current Behavior

Screen Shot 2022-05-10 at 4 15 23 PM

Possible Solution

I'm not aware of any solutions, so either a bug fix for this issue or a workaround would be appreciated.

Steps to Reproduce

  1. A Snyk scan has identified that [email protected] had vulnerable dependencies.
  2. I created a PR to upgrade to [email protected], which is then ran through a number of CircleCI tests.
  3. The last test yarn build fails due to the following error: node_modules/@tsoa/runtime/dist/config.d.ts:43:18 - error TS2709: Cannot use namespace 'MulterOpts' as a type.
  4. The PR cannot be approved and merged.

Context (Environment)

Version of the library: 4.0.0 Version of NodeJS: 16.14.2

  • Confirm you were using yarn not npm: [x]

Detailed Description

A fix for error TS2709.

Breaking change?

No

azven-aumni avatar May 10 '22 23:05 azven-aumni

Hello there azven-aumni 👋

Thank you for opening your very first issue in this project.

We will try to get back to you as soon as we can.👀

github-actions[bot] avatar May 10 '22 23:05 github-actions[bot]

This happens if you don't have @types/multer in your dependencies. I think we could require these types at least as a peerDep.

WoH avatar May 21 '22 17:05 WoH

@WoH Just a question: why wouldn't we want to import it as a dependency since we are importing it in packages/runtime/src/config.ts

RobbeCl avatar Jun 09 '22 22:06 RobbeCl

Would love to pick up this issue if it is not yet assigned to anybody. @WoH

dxphilo avatar Jun 28 '22 08:06 dxphilo

Please go ahead

WoH avatar Jun 28 '22 09:06 WoH