rc/middleware/Cloudinary-Middleware/cloudinary.service.ts:8:36 – error TS2694: Namespace ‘multer’ has no exported member ‘File’.
8 async uploadImages(files: multer.File[] | multer.File): Promise<(UploadApiResponse | UploadApiErrorResponse)[]> {
~~~~
src/middleware/Cloudinary-Middleware/cloudinary.service.ts:8:52 – error TS2694: Namespace ‘multer’ has no exported member ‘File’.
8 async uploadImages(files: multer.File[] | multer.File): Promise<(UploadApiResponse | UploadApiErrorResponse)[]> {
~~~~
src/products/products.controller.ts:24:87 – error TS2694: Namespace ‘multer’ has no exported member ‘File’.
24 async postProduct(@Body() body: addProductDto, @UploadedFiles() files: Array<multer.File>) {
~~~~
src/products/products.controller.ts:66:120 – error TS2694: Namespace ‘multer’ has no exported member ‘File’.
66 async updateProduct(@Param(‘id’) id: string, @Body() body: updateProductDto, @UploadedFiles() files?: Array<multer.File>) {
~~~~
src/products/products.service.ts:20:42 – error TS2694: Namespace ‘multer’ has no exported member ‘File’.
20 async addImagesforUrls(files: multer.File[]): Promise<string[]> {
~~~~
src/products/products.service.ts:43:71 – error TS2694: Namespace ‘multer’ has no exported member ‘File’.
43 async addProduct(addProductDto: addProductDto, prodImages: multer.File[] ) : Promise {
~~~~
src/products/products.service.ts:95:100 – error TS2694: Namespace ‘multer’ has no exported member ‘File’.
95 async updateProduct(updateProductDto: updateProductDto, productId: string, prodImages?: multer.File[]): Promise {
~~~~
The only issues is it’s running on my teammates backend serves yet on mine its throwing theses errors
I have tried to run
yarn add @types/multer —dev
Tried to add
Types:[“node”,”multer”]
to my tsconfig.json
I eventually added
“TypesRoot”: [“node_modules/@types”]
But out of 7 errors am left with 6
I double checked iff we using the same typescript version with my teammates we have same package.json. crazy l that am the only one with thse errors