Skip to content

[Workshop] - Modernizer - Backend errors/warnings on build #223

Description

@tebanieo

When you build the backend for the first time there are 18 errors in 6 files. The project runs without problems but the errors cause confusion to some of the workshop participants.

/backend$ npm run build

Found 18 errors in 6 files. 
Errors Files
 2 src/controllers/AdminController.ts:321
 1 src/middleware/seller.ts:111
 2 src/routes/cart.ts:78
 5 src/routes/categories.ts:135
 3 src/routes/orders.ts:84
 5 src/routes/products.ts:158 

Example error: src/routes/products.ts:530:34 - error TS2345: Argument of type 'string | string[]' is not assignable to parameter of type 'string'. Type 'string[]' is not assignable to type 'string'. 530const productId = parseInt(req.params.id, 10);

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugneeds triageThe issue is open and it needs proper triaging

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions